cf 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/agent-context.json +189 -187
- package/dist/_meta/commands.json +2591 -2248
- package/dist/_meta/hand-written-commands.json +146 -1
- package/dist/_meta/schemas.json +1548 -1313
- package/dist/{abuse-reports-BbaHw4ST.mjs → abuse-reports-CDFjJ2e8.mjs} +1 -1
- package/dist/{access-D6Xz892p.mjs → access-BoT1waG4.mjs} +1 -1
- package/dist/{account-DvxcqeaK.mjs → account-agnMUKWj.mjs} +1 -1
- package/dist/{account-tags-CeqfEWpz.mjs → account-tags-BRMMHCee.mjs} +1 -1
- package/dist/{accounts-Bx-8BMH9.mjs → accounts-Cut77dAt.mjs} +2 -2
- package/dist/{acm--0opdSGE.mjs → acm-C8WgXNCl.mjs} +1 -1
- package/dist/{addressing-BS1ynzLA.mjs → addressing-CR8EV42x.mjs} +1 -1
- package/dist/{agent-context-BPhyrSns.mjs → agent-context-Wj5TRRbW.mjs} +1 -1
- package/dist/{agent-memory-DczzpEw5.mjs → agent-memory-CVJpKKZy.mjs} +1 -1
- package/dist/{ai-CDdCTcQl.mjs → ai-BbNYt-yI.mjs} +1 -1
- package/dist/{ai-audit-Bx9KMQYh.mjs → ai-audit-mVajM-2i.mjs} +1 -1
- package/dist/{ai-gateway-BSXJEaYS.mjs → ai-gateway-BsepSA_v.mjs} +2 -2
- package/dist/{ai-search-DRQj1aMu.mjs → ai-search-DbEJqm5-.mjs} +1 -1
- package/dist/{ai-security-C_Rb0lGT.mjs → ai-security-DmyB5EYk.mjs} +1 -1
- package/dist/{alerting-BAR9eFs2.mjs → alerting-dmy3hd8O.mjs} +3 -3
- package/dist/analytics-B1xBMla0.mjs +5 -0
- package/dist/{analytics_engine-DkEzlhfT.mjs → analytics_engine-DazCn3iC.mjs} +1 -1
- package/dist/{api-security-jA0lOk6a.mjs → api-security-0HXCzfHk.mjs} +1 -1
- package/dist/{argo-Cz4pDagx.mjs → argo-DSHsE8zv.mjs} +1 -1
- package/dist/{artifacts-BcLTGfAv.mjs → artifacts-CwiU9Mxu.mjs} +1 -1
- package/dist/{audit-logs-DbIv4n6u.mjs → audit-logs-DwFtMDwH.mjs} +1 -1
- package/dist/{auth-rW5d3jtr.mjs → auth-B0ZyXc3y.mjs} +1 -1
- package/dist/{auth-tvDdC1J-.mjs → auth-DWxtJ918.mjs} +2 -2
- package/dist/{billing-Md87QjqW.mjs → billing-Cbpadkgu.mjs} +1 -1
- package/dist/{bot-management-VHMo4hpU.mjs → bot-management-B6M2Vyyn.mjs} +1 -1
- package/dist/{botnet-feed-BHqfo3sa.mjs → botnet-feed-Dn8UuE4h.mjs} +1 -1
- package/dist/{brand-protection-HUeR6Pof.mjs → brand-protection-B5R0b3pu.mjs} +1 -1
- package/dist/{browser-extension-199oZg3X.mjs → browser-extension-D55pYZf_.mjs} +1 -1
- package/dist/{browser-run-DDasyux-.mjs → browser-run-C1b2VkGB.mjs} +1 -1
- package/dist/build-CP2JUfV1.mjs +2 -0
- package/dist/{builds-B-lXn6JR.mjs → builds-CVEXO_4a.mjs} +8 -8
- package/dist/{cache-CevKpiTM.mjs → cache-BU5xX82E.mjs} +1 -1
- package/dist/{certificate-authorities-DAg-aO1B.mjs → certificate-authorities--tZTWJWD.mjs} +1 -1
- package/dist/cf-BV2HLCQm.mjs +18 -0
- package/dist/{chunk-QBZBEHZB-BuiXJn8j.mjs → chunk-QBZBEHZB-BcCMlc8C.mjs} +1 -1
- package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +103 -0
- package/dist/{client-certificates-Bay7oPLE.mjs → client-certificates-DX84qeYG.mjs} +1 -1
- package/dist/{client-side-security-CbU9xn0k.mjs → client-side-security-DsSO2rZQ.mjs} +1 -1
- package/dist/{cloud-connector-AH2ClcSL.mjs → cloud-connector-cf8qlxap.mjs} +1 -1
- package/dist/{cloudforce-one-DwOfS75V.mjs → cloudforce-one-DzVXorbu.mjs} +2 -2
- package/dist/command-BL6weJf3.mjs +3 -0
- package/dist/command-DYrspBc0.mjs +2 -0
- package/dist/{completions-nPO9PdSu.mjs → completions-Dn621okY.mjs} +1 -1
- package/dist/{config-B8lwPpVl.mjs → config-BY6KpMZs.mjs} +1 -1
- package/dist/config.d.mts +1 -1729
- package/dist/config.mjs +1 -1
- package/dist/{connector-interrupts-DcLrqM2V.mjs → connector-interrupts-DqpqPPkp.mjs} +1 -1
- package/dist/{connector-telemetry-events-PrJWgNs9.mjs → connector-telemetry-events-CCD-_B-8.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-CIjJm5yu.mjs → connector-telemetry-snapshots-D3CeGGhk.mjs} +1 -1
- package/dist/{connectors-CEAy30E-.mjs → connectors-aPQspZdg.mjs} +1 -1
- package/dist/{containers-BsbDqbSn.mjs → containers-D0Kjl8h-.mjs} +1 -1
- package/dist/{content-scan-BdK936iO.mjs → content-scan-BVx18XmS.mjs} +1 -1
- package/dist/{cps-oP97-qkm.mjs → cps-ByazyM0x.mjs} +1 -1
- package/dist/{csamScanner-DUNN4INg.mjs → csamScanner-OG5lQxBC.mjs} +1 -1
- package/dist/{ct-alerting-dV_gsV2w.mjs → ct-alerting-BJx5n8Zf.mjs} +1 -1
- package/dist/{custom-certificates-DYspvjo4.mjs → custom-certificates-BuJ2e9TA.mjs} +1 -1
- package/dist/{custom-csrs-DjSWLQRu.mjs → custom-csrs-CR_5qbST.mjs} +1 -1
- package/dist/{custom-hostnames-df1lH6IY.mjs → custom-hostnames-BzDTsQXb.mjs} +1 -1
- package/dist/{custom-nameservers-CLTbN-9R.mjs → custom-nameservers-OfMPRGkD.mjs} +1 -1
- package/dist/custom-pages-BmGXoTIo.mjs +3 -0
- package/dist/d1-DedC8N0N.mjs +21 -0
- package/dist/data-security-B2UB26ry.mjs +7 -0
- package/dist/{dcv-delegation-_r6Vc6VL.mjs → dcv-delegation-C11vmzbG.mjs} +1 -1
- package/dist/{deploy-QTGENpOM.mjs → deploy-BtETDvDA.mjs} +1 -1
- package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-BoLTdQzS.mjs} +1 -1
- package/dist/{dev-CAubuxCc.mjs → dev-B5WcIpEr.mjs} +2 -2
- package/dist/{diagnostics-B0DRh714.mjs → diagnostics-Cf6BLpAo.mjs} +1 -1
- package/dist/dialog-Bud0hiYv.mjs +2 -0
- package/dist/{dist-DW5BPGFs.mjs → dist-BRg_z9Ut.mjs} +1 -1
- package/dist/{shared-YJtB5KZB.mjs → dist-CFQREIRi.mjs} +86 -86
- package/dist/dist-CyisSore.mjs +371 -0
- package/dist/dist-Dr4Hg_Up.mjs +48 -0
- package/dist/{dls-CFzTHcZM.mjs → dls-R6PvHbhj.mjs} +1 -1
- package/dist/{dns-Dw6u-NV1.mjs → dns-Cl8se64c.mjs} +1 -1
- package/dist/{dns-firewall-CIPptslp.mjs → dns-firewall-WtmKilDT.mjs} +1 -1
- package/dist/dry-run-YSQndLvt.mjs +2 -0
- package/dist/{durable-objects-CCkeqqBq.mjs → durable-objects-jfVU6yp_.mjs} +1 -1
- package/dist/{email-auth-kdxO51Oz.mjs → email-auth-DPmZ85eW.mjs} +1 -1
- package/dist/{email-routing-BLggZdQq.mjs → email-routing-Bf6DbNTr.mjs} +1 -1
- package/dist/{email-security-DjADlgdM.mjs → email-security-DTifjSxM.mjs} +1 -1
- package/dist/{email-sending-Cz7E7GoP.mjs → email-sending-Dm3WkFHV.mjs} +1 -1
- package/dist/{error-sanitization-DfLijlBJ.mjs → error-sanitization-D8zuyPj_.mjs} +1 -1
- package/dist/{fieldExtractors-BWaMi6lD.mjs → fieldExtractors-CeXZL0-I.mjs} +1 -1
- package/dist/{firewall-5t6OBIOl.mjs → firewall-D5N2APXO.mjs} +1 -1
- package/dist/{flagship-CzG_VoNR.mjs → flagship-sUOy9jei.mjs} +1 -1
- package/dist/{fraud-UOg_69Ob.mjs → fraud-WLW2Ep1Z.mjs} +1 -1
- package/dist/{google-tag-gateway-DirkD-Q2.mjs → google-tag-gateway-lbww1FaJ.mjs} +1 -1
- package/dist/{healthchecks-BkHZGTp1.mjs → healthchecks-0ih8Qjiw.mjs} +1 -1
- package/dist/{hostnames-EUYOZm21.mjs → hostnames-Ba6FuL8K.mjs} +1 -1
- package/dist/{hyperdrive-ZoLJlJCL.mjs → hyperdrive-DMqcU639.mjs} +1 -1
- package/dist/{iam-BQ2xSgYN.mjs → iam-CXlYm0uC.mjs} +1 -1
- package/dist/{images-CkEq6ScP.mjs → images-D_g1oli6.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-DDWEdGyl.mjs → intel-B8bS0ARd.mjs} +1 -1
- package/dist/interactive-CGOh-aYq.mjs +32 -0
- package/dist/{ips-54Qmy-Uw.mjs → ips-68fzniN4.mjs} +1 -1
- package/dist/{keyless-certificates-CXHLc3Qz.mjs → keyless-certificates-CeLnqBvX.mjs} +1 -1
- package/dist/{keys-rvI4TC3Z.mjs → keys-DkVdS2lF.mjs} +1 -1
- package/dist/{kv-CAeN1zBy.mjs → kv-gDAN50BQ.mjs} +1 -1
- package/dist/{leaked-credential-checks-CbbwtG-p.mjs → leaked-credential-checks-DfnvHpvg.mjs} +1 -1
- package/dist/{lifecycle-XswDq0ZB.mjs → lifecycle-CadF_i2n.mjs} +1 -1
- package/dist/{load-balancers-BFwdwAIU.mjs → load-balancers-m0HqyXPZ.mjs} +1 -1
- package/dist/{local-C6XsFD_W.mjs → local-BwL_gesw.mjs} +1 -1
- package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-Dj8k-p62.mjs} +1 -1
- package/dist/{logo-matches-Y3PxVn7t.mjs → logo-matches-DPbHlsKQ.mjs} +1 -1
- package/dist/{logos-BN8SvJhS.mjs → logos-DFBJFAYJ.mjs} +1 -1
- package/dist/{logpush-BnLA4WVm.mjs → logpush-gzmlZayc.mjs} +1 -1
- package/dist/logs-BuzwQgt5.mjs +18 -0
- package/dist/{magic-cloud-networking-wPuLwu-F.mjs → magic-cloud-networking-BbHCi1Vp.mjs} +1 -1
- package/dist/{magic-network-monitoring-BNERUpxS.mjs → magic-network-monitoring-kWMmnPTG.mjs} +1 -1
- package/dist/{magic-transit-6tvVOECW.mjs → magic-transit-ClSmJDKw.mjs} +1 -1
- package/dist/{managed-defense-AYwBOYIH.mjs → managed-defense-EOihg1UR.mjs} +1 -1
- package/dist/{managed-transforms-HZZNrkC7.mjs → managed-transforms-BZ_XdGE2.mjs} +1 -1
- package/dist/{matches-Dp91L3dL.mjs → matches-B6sG0_fr.mjs} +1 -1
- package/dist/{mcp-P7pcieiT.mjs → mcp--kK0vS5i.mjs} +1 -1
- package/dist/{mesh-DjFrk6PL.mjs → mesh-DfXYUHOO.mjs} +1 -1
- package/dist/{mtls-certificates-DZMoef2H.mjs → mtls-certificates-DZd-0X7l.mjs} +1 -1
- package/dist/{network-7cd1U6-I.mjs → network-U6f_5ihp.mjs} +1 -1
- package/dist/{network-interconnects-CQ7cPZjK.mjs → network-interconnects-DKZGTiYM.mjs} +1 -1
- package/dist/oauth-BdVr2hJp.mjs +14 -0
- package/dist/{oauth-clients-P9t-eMnx.mjs → oauth-clients-CY3OkPhC.mjs} +1 -1
- package/dist/{oauth-scopes-C3r9Qh_y.mjs → oauth-scopes-BTY7_5L-.mjs} +1 -1
- package/dist/{observability-M1DnLhMR.mjs → observability-Bsp-LdmJ.mjs} +1 -1
- package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-ClEt4E8F.mjs} +3 -3
- package/dist/{organization-cUE7GDCt.mjs → organization-BSeMdj-7.mjs} +1 -1
- package/dist/{organizations-C-Hcpd0w.mjs → organizations-BroR48Nv.mjs} +1 -1
- package/dist/{origin-ca-certificates-C8cJMyQH.mjs → origin-ca-certificates-jC-EMn6W.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DjZJCk8M.mjs → origin-post-quantum-encryption-DIspLvA0.mjs} +1 -1
- package/dist/{origin-tls-client-auth-BsjR5EAV.mjs → origin-tls-client-auth-CZ_nUEcM.mjs} +1 -1
- package/dist/{page-rules-B-zq1EUb.mjs → page-rules-ZcdjPohY.mjs} +1 -1
- package/dist/{pages-B6YpkPos.mjs → pages-W4tKa7xk.mjs} +1 -1
- package/dist/pay-per-crawl-BNM1mJmP.mjs +5 -0
- package/dist/pay-per-use-DKxlnkH3.mjs +2 -0
- package/dist/{pipelines-BJc_RylD.mjs → pipelines-Dug0BR-c.mjs} +1 -1
- package/dist/{precursor-CLQu7suY.mjs → precursor-D-11DkRU.mjs} +1 -1
- package/dist/previews-D_Nv4dR6.mjs +4 -0
- package/dist/{progress-V6SZV3Ux.mjs → progress-a5IKeKni.mjs} +1 -1
- package/dist/project-settings-Bc3wYHo8.mjs +3 -0
- package/dist/prompt-BP8XrQSj.mjs +3 -0
- package/dist/{queries-DSrrket-.mjs → queries-BdA2vJoe.mjs} +1 -1
- package/dist/{queues-Tf7kPBpn.mjs → queues-Bu06ZqUE.mjs} +1 -1
- package/dist/{r2-DmKNnxtC.mjs → r2-COC9wMKb.mjs} +1 -1
- package/dist/{r2-data-catalog-DBxoifOq.mjs → r2-data-catalog-CX5Rl5Qx.mjs} +1 -1
- package/dist/{radar-Csk7Ab-b.mjs → radar-L-yoLIHF.mjs} +1 -1
- package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNH2V8qH.mjs} +1 -1
- package/dist/{realtime-CDehZVhV.mjs → realtime-JKIiXfzi.mjs} +1 -1
- package/dist/{registrar-vflzeNQ9.mjs → registrar-_dYUZrK0.mjs} +2 -2
- package/dist/{registrar-sandbox-BxVdfnam.mjs → registrar-sandbox-D1yfW_Q_.mjs} +2 -2
- package/dist/{registry-CWUfXloz.mjs → registry-BrtVdMrC.mjs} +1 -1
- package/dist/{reporting-BaPZ1PHN.mjs → reporting-3fyoMcmb.mjs} +1 -1
- package/dist/request-headers-BhQQAfJt.mjs +2 -0
- package/dist/{request-tracers-C_UVBexV.mjs → request-tracers-TisEth2p.mjs} +1 -1
- package/dist/{resolve-B8CyM1mi.mjs → resolve-CYUp6YgC.mjs} +1 -1
- package/dist/{resource-sharing-CoB4S9j1.mjs → resource-sharing-C4-dnohU.mjs} +1 -1
- package/dist/{resource-tagging-CUiUC5g4.mjs → resource-tagging-BRDifKqM.mjs} +1 -1
- package/dist/{rules-4O8076_s.mjs → rules-BCF3gIkw.mjs} +2 -2
- package/dist/{rulesets-C84MxTYo.mjs → rulesets-wp6rllt3.mjs} +1 -1
- package/dist/{rum-Bvwkrntx.mjs → rum-B77awgoB.mjs} +1 -1
- package/dist/run-BS8otL3u.mjs +2 -0
- package/dist/{schema-C8hU6G9R.mjs → schema-DmuJtMN5.mjs} +1 -1
- package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CUGxFeZe.mjs} +4 -4
- package/dist/{scim-BvxQmde6.mjs → scim-C9BmUYil.mjs} +1 -1
- package/dist/{sdk-C12y5qCN.mjs → sdk-Bvqx-_3z.mjs} +1 -1
- package/dist/{secrets-store-DOKWiC-j.mjs → secrets-store-ckkZR2dM.mjs} +1 -1
- package/dist/{security-center-Bhy_aC-w.mjs → security-center-BCahKT57.mjs} +1 -1
- package/dist/{security-txt-L7HJ9tq5.mjs → security-txt-0SI5du7I.mjs} +1 -1
- package/dist/shared-D0B-7q-D.mjs +2 -0
- package/dist/{smart-shield-COMXuQ1S.mjs → smart-shield-BDPbrZa4.mjs} +1 -1
- package/dist/{snippets-DffQhlKt.mjs → snippets-CVRR_h0i.mjs} +1 -1
- package/dist/spawn-DP4T92ss.mjs +519 -0
- package/dist/{spectrum-Cmf7SqQE.mjs → spectrum-CjNXQIQE.mjs} +3 -3
- package/dist/{speed-m8cdhLFS.mjs → speed-CrXCHk3h.mjs} +1 -1
- package/dist/src-BbnV77C4.mjs +108 -0
- package/dist/{ssl-D4ffsdSw.mjs → ssl-DKORhHkh.mjs} +1 -1
- package/dist/{startup-profile-Dx95Y5cl.mjs → startup-profile-CBIH6yZy.mjs} +3 -3
- package/dist/{state-CHif8Y5I.mjs → state-QUu6HfxC.mjs} +1 -1
- package/dist/{stream-DPF5fojV.mjs → stream-wY3zi3FK.mjs} +1 -1
- package/dist/{submit-Br8hfP0_.mjs → submit-B-4oCBSk.mjs} +1 -1
- package/dist/{tags-Bnt4JuxQ.mjs → tags-5uJEkYJZ.mjs} +1 -1
- package/dist/{telemetry-DjGNSlkU.mjs → telemetry-2s9Y3FaN.mjs} +1 -1
- package/dist/{telemetry-Ch1vCICm.mjs → telemetry-n3NJourL.mjs} +1 -1
- package/dist/{tenant-D8u0CxoC.mjs → tenant-BkFvv2o3.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BrWMyslZ.mjs → tenant-custom-nameservers-DcjC1q0r.mjs} +1 -1
- package/dist/{tools-D9RZkZRc.mjs → tools-Dz1JCrHd.mjs} +1 -1
- package/dist/tunnel-Cd4ipbvJ.mjs +2 -0
- package/dist/{tunnels-BkNPpTHa.mjs → tunnels-9Zg3ePwD.mjs} +1 -1
- package/dist/{turnstile-MgwRECJv.mjs → turnstile-BTwKYpzD.mjs} +1 -1
- package/dist/{url-info-Ddp7MgcI.mjs → url-info-D7Y61BFd.mjs} +1 -1
- package/dist/{url-normalization-3ptK9ntV.mjs → url-normalization-B4n8HiNQ.mjs} +1 -1
- package/dist/{url-scanner-Psb9ollR.mjs → url-scanner-CiCIltSQ.mjs} +1 -1
- package/dist/{user-DWdshcIu.mjs → user-DDFDGJ0Y.mjs} +1 -1
- package/dist/{values-CDKQL1z2.mjs → values-DRznB_Cl.mjs} +1 -1
- package/dist/{vectorize-CTYYUyQj.mjs → vectorize-CbznPhzq.mjs} +1 -1
- package/dist/waiting-rooms-CKP5hYBK.mjs +11 -0
- package/dist/{web-assets-CpDwDEx8.mjs → web-assets-C-ZoSkkh.mjs} +1 -1
- package/dist/{web3-YsjDyAzH.mjs → web3-DwlN4dOw.mjs} +1 -1
- package/dist/{workers-builds-BWo5vUA9.mjs → workers-builds-ECw_x_kp.mjs} +1 -1
- package/dist/{workers-for-platforms-ASJsxYdM.mjs → workers-for-platforms-BYGy46R6.mjs} +2 -2
- package/dist/{workers-vpc-RkTnRvA2.mjs → workers-vpc-CCosFcxz.mjs} +1 -1
- package/dist/workers-zFMrbUkg.mjs +6 -0
- package/dist/{workflows-KrIFI9ns.mjs → workflows-C8GXGDRW.mjs} +1 -1
- package/dist/{zaraz-DglXbVzZ.mjs → zaraz-B5UIREaz.mjs} +1 -1
- package/dist/{zero-trust-RilTdSjX.mjs → zero-trust-DUp0XoIo.mjs} +50 -50
- package/dist/{zone-DsBtVkvT.mjs → zone-BGLkk-mL.mjs} +1 -1
- package/dist/{zones-BFxvWFQW.mjs → zones-CwYjNXMH.mjs} +1 -1
- package/package.json +11 -11
- package/dist/analytics-BaUZwNc5.mjs +0 -4
- package/dist/build-0QlYUfFS.mjs +0 -2
- package/dist/cf-C11NGkjx.mjs +0 -18
- package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
- package/dist/command-CMzMsll4.mjs +0 -2
- package/dist/custom-pages-DzKnSgL3.mjs +0 -3
- package/dist/d1-JBEqjJoj.mjs +0 -20
- package/dist/data-security-CIktWnXt.mjs +0 -7
- package/dist/dist-12KzRsBM.mjs +0 -387
- package/dist/dist-BCVqQpg2.mjs +0 -2
- package/dist/dist-Cp3uJN1x.mjs +0 -48
- package/dist/dist-S9K_8gq9.mjs +0 -9
- package/dist/dry-run-DiVy1lVo.mjs +0 -2
- package/dist/interactive-B2E03Fs-.mjs +0 -11
- package/dist/interactive-_B-EqD0Y.mjs +0 -23
- package/dist/logexplorer-D8rOPB5I.mjs +0 -17
- package/dist/logs-CDo7Y5sA.mjs +0 -3
- package/dist/oauth-DH3kMXSs.mjs +0 -14
- package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
- package/dist/prompt-DjRTpML4.mjs +0 -3
- package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
- package/dist/request-headers-CC4eHmI2.mjs +0 -3
- package/dist/run-CRfinkSe.mjs +0 -2
- package/dist/schemas-O_ZNaF8R.mjs +0 -65
- package/dist/spawn-C1AISA2V.mjs +0 -526
- package/dist/src-C8phrg-8.mjs +0 -109
- package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
- package/dist/workers-BKKxaZcz.mjs +0 -6
- /package/dist/{alerts-B2SJO4nd.mjs → alerts-CarPLL8k.mjs} +0 -0
- /package/dist/{autorag-iNjZXw1n.mjs → autorag-zK-3harf.mjs} +0 -0
- /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-Cmw7PZ7a.mjs} +0 -0
- /package/dist/{brands-BrVnNrT3.mjs → brands-CpgTsX8h.mjs} +0 -0
- /package/dist/{clear-an9o3dJ3.mjs → clear-C5gzBA8G.mjs} +0 -0
- /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-abvWQN3T.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-BY-dbhQZ.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-DoMvHvCO.mjs} +0 -0
- /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-Cw3G4nap.mjs} +0 -0
- /package/dist/{health-CIUg1C5o.mjs → health-DkEXPkS6.mjs} +0 -0
- /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-nF-0Ze2h.mjs} +0 -0
- /package/dist/{internal-DmpATljO.mjs → internal-4fU2r5en.mjs} +0 -0
- /package/dist/{live-B66u3_0g.mjs → live-B4iGrwY2.mjs} +0 -0
- /package/dist/{metadata-D062SVyy.mjs → metadata-C5fJJr-k.mjs} +0 -0
- /package/dist/{output-COcSQsfn.mjs → output-Z2lQmPUW.mjs} +0 -0
- /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-DNsAFIeM.mjs} +0 -0
- /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-CsOim7bm.mjs} +0 -0
- /package/dist/{ready-C-H2cwp_.mjs → ready-tTe-zcIw.mjs} +0 -0
- /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-B3eTV5yC.mjs} +0 -0
- /package/dist/{refute-uSlzkQKq.mjs → refute-BY76YVrT.mjs} +0 -0
- /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-DdoF_a5y.mjs} +0 -0
- /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-sSgLwwZN.mjs} +0 -0
- /package/dist/{search-BlKeSfVD.mjs → search-BFvQr-sl.mjs} +0 -0
- /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-Cr8hiZPJ.mjs} +0 -0
- /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-DT2mLnu1.mjs} +0 -0
- /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-6gs5iy9T.mjs} +0 -0
- /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-D6XKO2EV.mjs} +0 -0
- /package/dist/{verify-S-TmhUDr.mjs → verify-CM1NakP0.mjs} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./sdk-
|
|
2
|
+
import{r as e}from"./sdk-Bvqx-_3z.mjs";import{U as t}from"./dist-CyisSore.mjs";import{r as n}from"./local-BwL_gesw.mjs";import{p as r}from"./oauth-BdVr2hJp.mjs";import{n as i}from"./request-headers-BhQQAfJt.mjs";import{i as a,t as o}from"./auth-DWxtJ918.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-C6XsFD_W.mjs";import{f as t,g as n}from"./oauth-DH3kMXSs.mjs";import{r}from"./auth-tvDdC1J-.mjs";import{t as i}from"./output-COcSQsfn.mjs";import{t as a}from"./dry-run-DiVy1lVo.mjs";import{t as o}from"./progress-V6SZV3Ux.mjs";import{t as s}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as c,t as l}from"./body-parser-DIlfApuJ.mjs";import{n as u}from"./input-validation-BxchZ9jE.mjs";import{a as d,i as f,n as p}from"./prompt-DjRTpML4.mjs";import{t as m}from"./cli-types-CrSoSMPF.mjs";function h(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <app-id>`,describe:`Returns day-wise livestream analytics for the specified time range.`,builder:h,handler:async c=>s({command:`realtime kit analytics livestreams daily get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.daily.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},te={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <app-id>`,describe:`Returns livestream analytics for the specified time range.`,builder:g,handler:async c=>s({command:`realtime kit analytics livestreams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/overall`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},v={command:`livestreams`,describe:`Livestream analytics for RealtimeKit applications`,builder:e=>e.command(_).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-date`,{type:`string`,description:`start date in YYYY-MM-DD format`}).option(`end-date`,{type:`string`,description:`end date in YYYY-MM-DD format`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <app-id>`,describe:`Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date.`,builder:y,handler:async c=>s({command:`realtime kit analytics usage get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_date:c[`start-date`],end_date:c[`end-date`]};if(c.dryRun){a({command:`cf realtime kit analytics usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.usage.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},x={command:`usage`,describe:`Usage analytics for RealtimeKit applications`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},S={command:`analytics`,describe:`Usage and livestream analytics for RealtimeKit applications`,builder:e=>e.command(v).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create new app for your account`,builder:C,handler:async f=>s({command:`realtime kit apps create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf realtime kit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({name:u(f.name,`name`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.realtime.kit.apps.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name field`));let m=l({name:u(f.name,`name`,`text`)});i(await o(`Creating`,async()=>s.realtime.kit.apps.create({...m,account_id:p})),{successLabel:`Created`})})};function T(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <app-id>`,describe:`Fetch details for an app in your account.`,builder:T,handler:async c=>s({command:`realtime kit apps get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.apps.get({account_id:l,app_id:c[`app-id`]})),{successLabel:`Loaded`})})};function D(e){return e.option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`search`,{type:`string`,description:`Search string that matches apps by name.`}).option(`sort-order`,{type:`string`,description:`Sort order for apps by creation time.`,choices:[`ASC`,`DESC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`Fetch all apps for your account`,builder:m(D),handler:async c=>s({command:`realtime kit apps list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},c,async()=>{let s={page_no:c[`page-no`],per_page:c[`per-page`],search:c.search,sort_order:c[`sort-order`]};if(c.dryRun){a({command:`cf realtime kit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.apps.list({account_id:u,...s})),{successLabel:`Loaded`})})},k={command:`apps`,describe:`RealtimeKit applications that group meetings, sessions, and configuration`,builder:e=>e.command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.positional(`livestream-id`,{type:`string`,description:`Livestream ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <livestream-id>`,describe:"Returns details of a livestream with sessions for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API.",builder:A,handler:async c=>s({command:`realtime kit livestreams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page_no:c[`page-no`],per_page:c[`per-page`]};if(c.dryRun){a({command:`cf realtime kit livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams/${c[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(c[`livestream-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"livestream-id":String(c[`livestream-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.livestreams.get({account_id:u,app_id:c[`app-id`],livestream_id:c[`livestream-id`],...s})),{successLabel:`Loaded`})})};function M(e){return e.option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`exclude-meetings`,{type:`boolean`,description:`Exclude the RealtimeKit meetings that are livestreamed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`status`,{type:`string`,description:`Specifies the status of the operation.`,choices:[`LIVE`,`IDLE`,`ERRORED`,`INVOKED`]}).option(`start-time`,{type:`string`,description:`Specify the start time range in ISO format to access the live stream.`}).option(`end-time`,{type:`string`,description:`Specify the end time range in ISO format to access the live stream.`}).option(`sort-order`,{type:`string`,description:`Specifies the sorting order for the results.`,choices:[`ASC`,`DSC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:"Returns details of livestreams associated with the given App ID. It includes livestreams created by your App and RealtimeKit meetings that are livestreamed by your App. If you only want details of livestreams created by your App and not RealtimeKit meetings, you can use the `exclude_meetings` query parameter.",builder:m(M),handler:async c=>s({command:`realtime kit livestreams list`,classification:{safeFlags:[`exclude-meetings`,`status`,`sort-order`,`dry-run`]}},c,async()=>{let s={exclude_meetings:c[`exclude-meetings`],per_page:c[`per-page`],page_no:c[`page-no`],status:c.status,start_time:c[`start-time`],end_time:c[`end-time`],sort_order:c[`sort-order`]};if(c.dryRun){a({command:`cf realtime kit livestreams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.livestreams.list({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})};function P(e){return e.positional(`livestream-session-id`,{type:`string`,description:`Livestream-session-id`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <livestream-session-id>`,describe:"Returns livestream session details for the given livestream session ID. Retrieve the `livestream_session_id`using the `Fetch livestream session details using a session ID` API.",builder:P,handler:async c=>s({command:`realtime kit livestreams sessions get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit livestreams sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams/sessions/${c[`livestream-session-id`]==null?`<livestream-session-id>`:encodeURIComponent(String(c[`livestream-session-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"livestream-session-id":String(c[`livestream-session-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.livestreams.sessions.get({account_id:l,app_id:c[`app-id`],"livestream-session-id":c[`livestream-session-id`]})),{successLabel:`Loaded`})})};function I(e){return e.positional(`livestream-id`,{type:`string`,description:`Livestream ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list-active <livestream-id>`,describe:"Returns details of all active livestreams for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API.",builder:I,handler:async c=>s({command:`realtime kit livestreams sessions list-active`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit livestreams sessions list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams/${c[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(c[`livestream-id`]))}/active-livestream-session`,pathParams:{"app-id":String(c[`app-id`]??``),"livestream-id":String(c[`livestream-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.livestreams.sessions.listActive({account_id:l,app_id:c[`app-id`],livestream_id:c[`livestream-id`]})),{successLabel:`Loaded`})})},R={command:`sessions`,describe:`Sessions for RealtimeKit livestreams`,builder:e=>e.command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`video-config-height`,{type:`number`,description:`Height of the livestreaming video in pixels`}).option(`video-config-width`,{type:`number`,description:`Width of the livestreaming video in pixels`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`start <meeting-id>`,describe:"Starts livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:z,handler:async d=>s({command:`realtime kit livestreams start`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf realtime kit livestreams start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/livestreams`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({name:u(d.name,`name`,`text`),video_config:{height:d[`video-config-height`],width:d[`video-config-width`]}}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.realtime.kit.livestreams.start({...e,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`});return}let p=l({name:u(d.name,`name`,`text`),video_config:{height:d[`video-config-height`],width:d[`video-config-width`]}});i(await o(`Creating`,async()=>s.realtime.kit.livestreams.start({...p,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`})})};function V(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const H={command:`stop <meeting-id>`,describe:"Stops the active livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:V,handler:async c=>s({command:`realtime kit livestreams stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit livestreams stop`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/active-livestream/stop`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation stops the active livestream. Viewers lose the broadcast immediately.`})){process.stderr.write(`Aborted.
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{r}from"./auth-DWxtJ918.mjs";import{t as i}from"./output-Z2lQmPUW.mjs";import{t as a}from"./dry-run-YSQndLvt.mjs";import{t as o}from"./progress-a5IKeKni.mjs";import{t as s}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as c,t as l}from"./body-parser-Cmw7PZ7a.mjs";import{n as u}from"./input-validation-nF-0Ze2h.mjs";import{a as d,i as f,n as p}from"./prompt-BP8XrQSj.mjs";import{t as m}from"./cli-types-abvWQN3T.mjs";function h(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <app-id>`,describe:`Returns day-wise livestream analytics for the specified time range.`,builder:h,handler:async c=>s({command:`realtime kit analytics livestreams daily get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.daily.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},te={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <app-id>`,describe:`Returns livestream analytics for the specified time range.`,builder:g,handler:async c=>s({command:`realtime kit analytics livestreams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/overall`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},v={command:`livestreams`,describe:`Livestream analytics for RealtimeKit applications`,builder:e=>e.command(_).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-date`,{type:`string`,description:`start date in YYYY-MM-DD format`}).option(`end-date`,{type:`string`,description:`end date in YYYY-MM-DD format`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <app-id>`,describe:`Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date.`,builder:y,handler:async c=>s({command:`realtime kit analytics usage get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_date:c[`start-date`],end_date:c[`end-date`]};if(c.dryRun){a({command:`cf realtime kit analytics usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.usage.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},x={command:`usage`,describe:`Usage analytics for RealtimeKit applications`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},S={command:`analytics`,describe:`Usage and livestream analytics for RealtimeKit applications`,builder:e=>e.command(v).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create new app for your account`,builder:C,handler:async f=>s({command:`realtime kit apps create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf realtime kit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({name:u(f.name,`name`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.realtime.kit.apps.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name field`));let m=l({name:u(f.name,`name`,`text`)});i(await o(`Creating`,async()=>s.realtime.kit.apps.create({...m,account_id:p})),{successLabel:`Created`})})};function T(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <app-id>`,describe:`Fetch details for an app in your account.`,builder:T,handler:async c=>s({command:`realtime kit apps get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.apps.get({account_id:l,app_id:c[`app-id`]})),{successLabel:`Loaded`})})};function D(e){return e.option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`search`,{type:`string`,description:`Search string that matches apps by name.`}).option(`sort-order`,{type:`string`,description:`Sort order for apps by creation time.`,choices:[`ASC`,`DESC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`Fetch all apps for your account`,builder:m(D),handler:async c=>s({command:`realtime kit apps list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},c,async()=>{let s={page_no:c[`page-no`],per_page:c[`per-page`],search:c.search,sort_order:c[`sort-order`]};if(c.dryRun){a({command:`cf realtime kit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.apps.list({account_id:u,...s})),{successLabel:`Loaded`})})},k={command:`apps`,describe:`RealtimeKit applications that group meetings, sessions, and configuration`,builder:e=>e.command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.positional(`livestream-id`,{type:`string`,description:`Livestream ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <livestream-id>`,describe:"Returns details of a livestream with sessions for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API.",builder:A,handler:async c=>s({command:`realtime kit livestreams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page_no:c[`page-no`],per_page:c[`per-page`]};if(c.dryRun){a({command:`cf realtime kit livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams/${c[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(c[`livestream-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"livestream-id":String(c[`livestream-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.livestreams.get({account_id:u,app_id:c[`app-id`],livestream_id:c[`livestream-id`],...s})),{successLabel:`Loaded`})})};function M(e){return e.option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`exclude-meetings`,{type:`boolean`,description:`Exclude the RealtimeKit meetings that are livestreamed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`status`,{type:`string`,description:`Specifies the status of the operation.`,choices:[`LIVE`,`IDLE`,`ERRORED`,`INVOKED`]}).option(`start-time`,{type:`string`,description:`Specify the start time range in ISO format to access the live stream.`}).option(`end-time`,{type:`string`,description:`Specify the end time range in ISO format to access the live stream.`}).option(`sort-order`,{type:`string`,description:`Specifies the sorting order for the results.`,choices:[`ASC`,`DSC`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:"Returns details of livestreams associated with the given App ID. It includes livestreams created by your App and RealtimeKit meetings that are livestreamed by your App. If you only want details of livestreams created by your App and not RealtimeKit meetings, you can use the `exclude_meetings` query parameter.",builder:m(M),handler:async c=>s({command:`realtime kit livestreams list`,classification:{safeFlags:[`exclude-meetings`,`status`,`sort-order`,`dry-run`]}},c,async()=>{let s={exclude_meetings:c[`exclude-meetings`],per_page:c[`per-page`],page_no:c[`page-no`],status:c.status,start_time:c[`start-time`],end_time:c[`end-time`],sort_order:c[`sort-order`]};if(c.dryRun){a({command:`cf realtime kit livestreams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.livestreams.list({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})};function P(e){return e.positional(`livestream-session-id`,{type:`string`,description:`Livestream-session-id`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <livestream-session-id>`,describe:"Returns livestream session details for the given livestream session ID. Retrieve the `livestream_session_id`using the `Fetch livestream session details using a session ID` API.",builder:P,handler:async c=>s({command:`realtime kit livestreams sessions get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit livestreams sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams/sessions/${c[`livestream-session-id`]==null?`<livestream-session-id>`:encodeURIComponent(String(c[`livestream-session-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"livestream-session-id":String(c[`livestream-session-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.livestreams.sessions.get({account_id:l,app_id:c[`app-id`],"livestream-session-id":c[`livestream-session-id`]})),{successLabel:`Loaded`})})};function I(e){return e.positional(`livestream-id`,{type:`string`,description:`Livestream ID`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list-active <livestream-id>`,describe:"Returns details of all active livestreams for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API.",builder:I,handler:async c=>s({command:`realtime kit livestreams sessions list-active`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit livestreams sessions list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/livestreams/${c[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(c[`livestream-id`]))}/active-livestream-session`,pathParams:{"app-id":String(c[`app-id`]??``),"livestream-id":String(c[`livestream-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.livestreams.sessions.listActive({account_id:l,app_id:c[`app-id`],livestream_id:c[`livestream-id`]})),{successLabel:`Loaded`})})},R={command:`sessions`,describe:`Sessions for RealtimeKit livestreams`,builder:e=>e.command(F).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`video-config-height`,{type:`number`,description:`Height of the livestreaming video in pixels`}).option(`video-config-width`,{type:`number`,description:`Width of the livestreaming video in pixels`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`start <meeting-id>`,describe:"Starts livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:z,handler:async d=>s({command:`realtime kit livestreams start`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf realtime kit livestreams start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/livestreams`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({name:u(d.name,`name`,`text`),video_config:{height:d[`video-config-height`],width:d[`video-config-width`]}}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.realtime.kit.livestreams.start({...e,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`});return}let p=l({name:u(d.name,`name`,`text`),video_config:{height:d[`video-config-height`],width:d[`video-config-width`]}});i(await o(`Creating`,async()=>s.realtime.kit.livestreams.start({...p,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`})})};function V(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const H={command:`stop <meeting-id>`,describe:"Stops the active livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:V,handler:async c=>s({command:`realtime kit livestreams stop`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit livestreams stop`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/active-livestream/stop`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation stops the active livestream. Viewers lose the broadcast immediately.`})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>s.realtime.kit.livestreams.stop({account_id:l,app_id:c[`app-id`],meeting_id:c[`meeting-id`]})),{successLabel:`Deleted`})})},U={command:`livestreams`,describe:`Independent and meeting-based livestreams and their sessions`,builder:e=>e.command(j).command(N).command(B).command(H).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <meeting-id>`,describe:`Returns details of an ongoing active session for the given meeting ID.`,builder:W,handler:async c=>s({command:`realtime kit meetings active get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit meetings active get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/active-session`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.meetings.active.get({account_id:l,app_id:c[`app-id`],meeting_id:c[`meeting-id`]})),{successLabel:`Loaded`})})};function K(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const q={command:`kick-all <meeting-id>`,describe:`Kicks all participants from an active session for the given meeting ID.`,builder:K,handler:async c=>s({command:`realtime kit meetings active kick-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit meetings active kick-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/active-session/kick-all`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation disconnects every active participant immediately.`})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}i(await o(`Deleting`,async()=>s.realtime.kit.meetings.active.kickAll({account_id:l,app_id:c[`app-id`],meeting_id:c[`meeting-id`]})),{successLabel:`Deleted`})})};function J(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`custom-participant-ids`,{type:`string`,array:!0,description:`The custom_participant_ids field`}).option(`participant-ids`,{type:`string`,array:!0,description:`The participant_ids field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for kicking participants from an active session. At least one of `participant_ids` or `custom_participant_ids` must contain a value."})}const Y={command:`kick <meeting-id>`,describe:`Kicks one or more participants from an active session using user ID or custom participant ID.`,builder:J,handler:async u=>s({command:`realtime kit meetings active kick`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf realtime kit meetings active kick`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}/active-session/kick`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({custom_participant_ids:u[`custom-participant-ids`],participant_ids:u[`participant-ids`]}):c(u.body)});return}let s=await r(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.kick({...e,account_id:d,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`});return}let f=l({custom_participant_ids:u[`custom-participant-ids`],participant_ids:u[`participant-ids`]});i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.kick({...f,account_id:d,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`})})};function X(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`allow-unmute`,{type:`boolean`,description:`if false, participants won't be able to unmute themselves after they are muted`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for muting all participants in an active session.`})}const Z={command:`mute-all <meeting-id>`,describe:`Mutes all participants of an active session for the given meeting ID.`,builder:X,handler:async u=>s({command:`realtime kit meetings active mute-all`,classification:{safeFlags:[`allow-unmute`,`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf realtime kit meetings active mute-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}/active-session/mute-all`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({allow_unmute:u[`allow-unmute`]}):c(u.body)});return}let s=await r(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.muteAll({...e,account_id:d,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`});return}let f=l({allow_unmute:u[`allow-unmute`]});i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.muteAll({...f,account_id:d,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`})})};function Q(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`custom-participant-ids`,{type:`string`,array:!0,description:`The custom_participant_ids field`}).option(`participant-ids`,{type:`string`,array:!0,description:`The participant_ids field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for muting participants in an active session. At least one of `participant_ids` or `custom_participant_ids` must contain a value."})}const ne={command:`mute <meeting-id>`,describe:`Mutes one or more participants from an active session using user ID or custom participant ID.`,builder:Q,handler:async u=>s({command:`realtime kit meetings active mute`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf realtime kit meetings active mute`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${u[`app-id`]==null?`<app-id>`:encodeURIComponent(String(u[`app-id`]))}/meetings/${u[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(u[`meeting-id`]))}/active-session/mute`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({custom_participant_ids:u[`custom-participant-ids`],participant_ids:u[`participant-ids`]}):c(u.body)});return}let s=await r(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.mute({...e,account_id:d,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`});return}let f=l({custom_participant_ids:u[`custom-participant-ids`],participant_ids:u[`participant-ids`]});i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.mute({...f,account_id:d,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`})})};function re(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`anonymous`,{type:`boolean`,description:`if voters on a poll are anonymous`}).option(`hide-votes`,{type:`boolean`,description:`if votes on an option are visible before a person votes`}).option(`options`,{type:`string`,array:!0,description:`Different options for the question`}).option(`question`,{type:`string`,description:`Question of the poll`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a new poll`})}const ie={command:`create <meeting-id>`,describe:`Creates a new poll in an active session for the given meeting ID.`,builder:re,handler:async f=>s({command:`realtime kit meetings active polls create`,classification:{safeFlags:[`anonymous`,`hide-votes`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf realtime kit meetings active polls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${f[`app-id`]==null?`<app-id>`:encodeURIComponent(String(f[`app-id`]))}/meetings/${f[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(f[`meeting-id`]))}/active-session/poll`,pathParams:{"app-id":String(f[`app-id`]??``),"meeting-id":String(f[`meeting-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({anonymous:f.anonymous,hide_votes:f[`hide-votes`],options:f.options,question:u(f.question,`question`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.polls.create({...e,account_id:p,app_id:f[`app-id`],meeting_id:f[`meeting-id`]})),{successLabel:`Created`});return}if(f.options===void 0)throw Error(`--options is required (or pass --body with this field set).`);f.question===void 0&&(f.question=await d(`question`,`Question of the poll`));let m=l({anonymous:f.anonymous,hide_votes:f[`hide-votes`],options:f.options,question:u(f.question,`question`,`text`)});i(await o(`Creating`,async()=>s.realtime.kit.meetings.active.polls.create({...m,account_id:p,app_id:f[`app-id`],meeting_id:f[`meeting-id`]})),{successLabel:`Created`})})},ae={command:`polls`,describe:`Polls for active meeting sessions`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oe={command:`active`,describe:`Live meeting state and participant controls`,builder:e=>e.command(G).command(Y).command(q).command(ne).command(Z).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function se(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`ai-config-summarization-summary-type`,{type:`string`,description:`Defines the style of the summary, such as general, team meeting, or sales call.`,choices:[`general`,`team_meeting`,`sales_call`,`client_check_in`,`interview`,`daily_standup`,`one_on_one_meeting`,`lecture`,`code_review`]}).option(`ai-config-summarization-text-format`,{type:`string`,description:`Determines the text format of the summary, such as plain text or markdown.`,choices:[`plain_text`,`markdown`]}).option(`ai-config-summarization-word-limit`,{type:`number`,description:`Sets the maximum number of words in the meeting summary.`}).option(`ai-config-transcription-keywords`,{type:`string`,array:!0,description:`Adds specific terms to improve accurate detection during transcription.`}).option(`ai-config-transcription-language`,{type:`string`,description:`Specifies the language code for transcription to ensure accurate results.`,choices:[`en-US`,`en-IN`,`de`,`hi`,`sv`,`ru`,`pl`,`el`,`fr`,`nl`]}).option(`ai-config-transcription-profanity-filter`,{type:`boolean`,description:`Control the inclusion of offensive language in transcriptions.`}).option(`live-stream-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting livestreamed on start.`,default:!1}).option(`persist-chat`,{type:`boolean`,description:`If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space.`,default:!1}).option(`record-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting recorded as soon as someone joins the meeting.`,default:!1}).option(`recording-config-audio-config-channel`,{type:`string`,description:`Audio signal pathway within an audio file that carries a specific sound source.`,choices:[`mono`,`stereo`]}).option(`recording-config-audio-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis.`,choices:[`MP3`,`AAC`]}).option(`recording-config-audio-config-export-file`,{type:`boolean`,description:`Controls whether to export audio file seperately`}).option(`recording-config-file-name-prefix`,{type:`string`,description:`Adds a prefix to the beginning of the file name of the recording.`}).option(`recording-config-live-streaming-config-rtmp-url`,{type:`string`,description:`RTMP URL to stream to`}).option(`recording-config-max-seconds`,{type:`number`,description:`Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours.`}).option(`recording-config-realtimekit-bucket-config-enabled`,{type:`boolean`,description:"Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording."}).option(`recording-config-video-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded.`,choices:[`H264`,`VP8`,`VP9`]}).option(`recording-config-video-config-export-file`,{type:`boolean`,description:`Controls whether to export video file seperately`}).option(`recording-config-video-config-height`,{type:`number`,description:`Height of the recording video in pixels`}).option(`recording-config-video-config-watermark-position`,{type:`string`,description:`Position of the watermark`,choices:[`left top`,`right top`,`left bottom`,`right bottom`]}).option(`recording-config-video-config-watermark-url`,{type:`string`,description:`URL of the watermark image`}).option(`recording-config-video-config-width`,{type:`number`,description:`Width of the recording video in pixels`}).option(`session-keep-alive-time-in-secs`,{type:`number`,description:`Time in seconds, for which a session remains active, after the last participant has left the meeting.`,default:60}).option(`summarize-on-end`,{type:`boolean`,description:`Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API.`,default:!1}).option(`title`,{type:`string`,description:`Title of the meeting`}).option(`transcribe-on-end`,{type:`boolean`,description:`Automatically generate transcripts when the meeting ends.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create meeting body`}).check(e=>{if([`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-file-name-prefix`,`recording-config-live-streaming-config-rtmp-url`,`recording-config-max-seconds`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-height`,`recording-config-video-config-watermark-position`,`recording-config-video-config-watermark-url`,`recording-config-video-config-width`].some(t=>e[t]!==void 0)){let t=[`recording-config-realtimekit-bucket-config-enabled`].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 --recording_config-* flag is set`)}return!0})}const ce={command:`create <app-id>`,describe:`Create a meeting for the given App ID.`,builder:se,handler:async d=>s({command:`realtime kit meetings create`,classification:{safeFlags:[`ai-config-summarization-summary-type`,`ai-config-summarization-text-format`,`ai-config-transcription-language`,`ai-config-transcription-profanity-filter`,`live-stream-on-start`,`persist-chat`,`record-on-start`,`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-watermark-position`,`summarize-on-end`,`transcribe-on-end`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf realtime kit meetings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings`,pathParams:{"app-id":String(d[`app-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({ai_config:{summarization:{summary_type:u(d[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:u(d[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:d[`ai-config-summarization-word-limit`]},transcription:{keywords:d[`ai-config-transcription-keywords`],language:u(d[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:d[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:d[`live-stream-on-start`],persist_chat:d[`persist-chat`],record_on_start:d[`record-on-start`],recording_config:{audio_config:{channel:u(d[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:u(d[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:d[`recording-config-audio-config-export-file`]},file_name_prefix:u(d[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:u(d[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:d[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:d[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:u(d[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:d[`recording-config-video-config-export-file`],height:d[`recording-config-video-config-height`],watermark:{position:u(d[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:u(d[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:d[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:d[`session-keep-alive-time-in-secs`],summarize_on_end:d[`summarize-on-end`],title:u(d.title,`title`,`text`),transcribe_on_end:d[`transcribe-on-end`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.realtime.kit.meetings.create({...e,account_id:f,app_id:d[`app-id`]})),{successLabel:`Created`});return}let p=l({ai_config:{summarization:{summary_type:u(d[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:u(d[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:d[`ai-config-summarization-word-limit`]},transcription:{keywords:d[`ai-config-transcription-keywords`],language:u(d[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:d[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:d[`live-stream-on-start`],persist_chat:d[`persist-chat`],record_on_start:d[`record-on-start`],recording_config:{audio_config:{channel:u(d[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:u(d[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:d[`recording-config-audio-config-export-file`]},file_name_prefix:u(d[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:u(d[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:d[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:d[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:u(d[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:d[`recording-config-video-config-export-file`],height:d[`recording-config-video-config-height`],watermark:{position:u(d[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:u(d[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:d[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:d[`session-keep-alive-time-in-secs`],summarize_on_end:d[`summarize-on-end`],title:u(d.title,`title`,`text`),transcribe_on_end:d[`transcribe-on-end`]});i(await o(`Creating`,async()=>s.realtime.kit.meetings.create({...p,account_id:f,app_id:d[`app-id`]})),{successLabel:`Created`})})};function le(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <meeting-id>`,describe:`Returns a meeting details in an App for the given meeting ID.`,builder:le,handler:async c=>s({command:`realtime kit meetings get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={name:c.name};if(c.dryRun){a({command:`cf realtime kit meetings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.meetings.get({account_id:u,app_id:c[`app-id`],meeting_id:c[`meeting-id`],...s})),{successLabel:`Loaded`})})};function de(e){return e.option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`start-time`,{type:`string`,description:`The start time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`end-time`,{type:`string`,description:`The end time range for which you want to retrieve the meetings. The time must be specified in ISO format.`}).option(`search`,{type:`string`,description:`The search query string. You can search using the meeting ID or title.`}).option(`status`,{type:`string`,description:`Filter meetings by status.`,choices:[`ACTIVE`,`INACTIVE`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`Returns all meetings for the given App ID.`,builder:m(de),handler:async c=>s({command:`realtime kit meetings list`,classification:{safeFlags:[`status`,`dry-run`]}},c,async()=>{let s={page_no:c[`page-no`],per_page:c[`per-page`],start_time:c[`start-time`],end_time:c[`end-time`],search:c.search,status:c.status};if(c.dryRun){a({command:`cf realtime kit meetings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.meetings.list({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})};function pe(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`get <meeting-id>`,describe:"Returns livestream session details for the given meeting ID. Retreive the meeting ID using the `Create a meeting` API.",builder:pe,handler:async c=>s({command:`realtime kit meetings livestream get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page_no:c[`page-no`],per_page:c[`per-page`]};if(c.dryRun){a({command:`cf realtime kit meetings livestream get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/livestream`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.meetings.livestream.get({account_id:u,app_id:c[`app-id`],meeting_id:c[`meeting-id`],...s})),{successLabel:`Loaded`})})};function he(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list-active <meeting-id>`,describe:`Returns details of all active livestreams for the given meeting ID.`,builder:he,handler:async c=>s({command:`realtime kit meetings livestream list-active`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit meetings livestream list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/active-livestream`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.meetings.livestream.listActive({account_id:l,app_id:c[`app-id`],meeting_id:c[`meeting-id`]})),{successLabel:`Loaded`})})},_e={command:`livestream`,describe:`Livestream operations associated with RealtimeKit meetings`,builder:e=>e.command(me).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ve(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`custom-participant-id`,{type:`string`,description:`A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. `}).option(`name`,{type:`string`,description:`(Optional) Name of the participant. `}).option(`picture`,{type:`string`,description:`(Optional) A URL to a picture to be used for the participant. `}).option(`preset-name`,{type:`string`,description:`Name of the preset to apply to this participant.`,default:`group_call_host`}).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 ye={command:`create <meeting-id>`,describe:`Adds a participant to the given meeting ID.`,builder:ve,handler:async f=>s({command:`realtime kit meetings participants create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf realtime kit meetings participants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${f[`app-id`]==null?`<app-id>`:encodeURIComponent(String(f[`app-id`]))}/meetings/${f[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(f[`meeting-id`]))}/participants`,pathParams:{"app-id":String(f[`app-id`]??``),"meeting-id":String(f[`meeting-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({custom_participant_id:u(f[`custom-participant-id`],`custom-participant-id`,`text`),name:u(f.name,`name`,`text`),picture:u(f.picture,`picture`,`text`),preset_name:u(f[`preset-name`],`preset-name`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.realtime.kit.meetings.participants.create({...e,account_id:p,app_id:f[`app-id`],meeting_id:f[`meeting-id`]})),{successLabel:`Created`});return}f[`custom-participant-id`]===void 0&&(f[`custom-participant-id`]=await d(`custom-participant-id`,`A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. `)),f[`preset-name`]===void 0&&(f[`preset-name`]=await d(`preset-name`,`Name of the preset to apply to this participant.`));let m=l({custom_participant_id:u(f[`custom-participant-id`],`custom-participant-id`,`text`),name:u(f.name,`name`,`text`),picture:u(f.picture,`picture`,`text`),preset_name:u(f[`preset-name`],`preset-name`,`text`)});i(await o(`Creating`,async()=>s.realtime.kit.meetings.participants.create({...m,account_id:p,app_id:f[`app-id`],meeting_id:f[`meeting-id`]})),{successLabel:`Created`})})};function be(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const xe={command:`delete <participant-id>`,describe:`Deletes a participant for the given meeting and participant ID.`,builder:be,handler:async c=>s({command:`realtime kit meetings participants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit meetings participants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/participants/${c[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(c[`participant-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``),"participant-id":String(c[`participant-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation removes the participant from the meeting and revokes their authentication token.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}i(await o(`Deleting`,async()=>s.realtime.kit.meetings.participants.delete({account_id:l,app_id:c[`app-id`],meeting_id:c[`meeting-id`],participant_id:c[`participant-id`]})),{successLabel:`Deleted`})})};function Se(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get <participant-id>`,describe:`Returns a participant details for the given meeting and participant ID.`,builder:Se,handler:async c=>s({command:`realtime kit meetings participants get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit meetings participants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/participants/${c[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(c[`participant-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``),"participant-id":String(c[`participant-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.realtime.kit.meetings.participants.get({account_id:l,app_id:c[`app-id`],meeting_id:c[`meeting-id`],participant_id:c[`participant-id`]})),{successLabel:`Loaded`})})};function we(e){return e.option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`page-no`,{type:`number`,description:`The page number from which you want your page search results to be displayed.`}).option(`per-page`,{type:`number`,description:`Number of results per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`Returns all participants detail for the given meeting ID.`,builder:we,handler:async c=>s({command:`realtime kit meetings participants list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page_no:c[`page-no`],per_page:c[`per-page`]};if(c.dryRun){a({command:`cf realtime kit meetings participants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/participants`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.meetings.participants.list({account_id:u,app_id:c[`app-id`],meeting_id:c[`meeting-id`],...s})),{successLabel:`Loaded`})})};function Ee(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`custom-participant-id`,{type:`string`,description:`Unique participant ID accepted by the replace participant API.`}).option(`name`,{type:`string`,description:`(Optional) Name of the participant.`}).option(`picture`,{type:`string`,description:`(Optional) A URL to a picture to be used for the participant.`}).option(`preset-name`,{type:`string`,description:`Name of the preset to apply to this participant.`}).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 De={command:`replace <participant-id>`,describe:`Replaces a participant's details for the given meeting and participant ID.`,builder:Ee,handler:async f=>s({command:`realtime kit meetings participants replace`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf realtime kit meetings participants replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${f[`app-id`]==null?`<app-id>`:encodeURIComponent(String(f[`app-id`]))}/meetings/${f[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(f[`meeting-id`]))}/participants/${f[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(f[`participant-id`]))}`,pathParams:{"app-id":String(f[`app-id`]??``),"meeting-id":String(f[`meeting-id`]??``),"participant-id":String(f[`participant-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({custom_participant_id:u(f[`custom-participant-id`],`custom-participant-id`,`text`),name:u(f.name,`name`,`text`),picture:u(f.picture,`picture`,`text`),preset_name:u(f[`preset-name`],`preset-name`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Updating`,async()=>s.realtime.kit.meetings.participants.replace({...e,account_id:p,app_id:f[`app-id`],meeting_id:f[`meeting-id`],participant_id:f[`participant-id`]})),{successLabel:`Updated`});return}f[`custom-participant-id`]===void 0&&(f[`custom-participant-id`]=await d(`custom-participant-id`,`Unique participant ID accepted by the replace participant API.`)),f[`preset-name`]===void 0&&(f[`preset-name`]=await d(`preset-name`,`Name of the preset to apply to this participant.`));let m=l({custom_participant_id:u(f[`custom-participant-id`],`custom-participant-id`,`text`),name:u(f.name,`name`,`text`),picture:u(f.picture,`picture`,`text`),preset_name:u(f[`preset-name`],`preset-name`,`text`)});i(await o(`Updating`,async()=>s.realtime.kit.meetings.participants.replace({...m,account_id:p,app_id:f[`app-id`],meeting_id:f[`meeting-id`],participant_id:f[`participant-id`]})),{successLabel:`Updated`})})};function Oe(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`refresh <participant-id>`,describe:`Regenerates participant's authentication token for the given meeting and participant ID.`,builder:Oe,handler:async c=>s({command:`realtime kit meetings participants tokens refresh`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit meetings participants tokens refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/meetings/${c[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(c[`meeting-id`]))}/participants/${c[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(c[`participant-id`]))}/token`,pathParams:{"app-id":String(c[`app-id`]??``),"meeting-id":String(c[`meeting-id`]??``),"participant-id":String(c[`participant-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.realtime.kit.meetings.participants.tokens.refresh({account_id:l,app_id:c[`app-id`],meeting_id:c[`meeting-id`],participant_id:c[`participant-id`]})),{successLabel:`Created`})})},Ae={command:`tokens`,describe:`Access tokens for RealtimeKit meeting participants`,builder:e=>e.command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function je(e){return e.positional(`participant-id`,{type:`string`,description:`ID of the participant. You can fetch the participant ID using the add a participant API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`meeting-id`,{type:`string`,description:`ID of the meeting. You can fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`name`,{type:`string`,description:`(Optional) Name of the participant.`}).option(`picture`,{type:`string`,description:`(Optional) A URL to a picture to be used for the participant.`}).option(`preset-name`,{type:`string`,description:`(Optional) Name of the preset to apply to this participant.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Me={command:`update <participant-id>`,describe:`Updates a participant's details for the given meeting and participant ID.`,builder:je,handler:async d=>s({command:`realtime kit meetings participants update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf realtime kit meetings participants update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/participants/${d[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(d[`participant-id`]))}`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``),"participant-id":String(d[`participant-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({name:u(d.name,`name`,`text`),picture:u(d.picture,`picture`,`text`),preset_name:u(d[`preset-name`],`preset-name`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.realtime.kit.meetings.participants.update({...e,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`],participant_id:d[`participant-id`]})),{successLabel:`Updated`});return}let p=l({name:u(d.name,`name`,`text`),picture:u(d.picture,`picture`,`text`),preset_name:u(d[`preset-name`],`preset-name`,`text`)});i(await o(`Updating`,async()=>s.realtime.kit.meetings.participants.update({...p,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`],participant_id:d[`participant-id`]})),{successLabel:`Updated`})})},Ne={command:`participants`,describe:`Participants in RealtimeKit meetings`,builder:e=>e.command(ye).command(xe).command(Ce).command(Te).command(De).command(Me).command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pe(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`ai-config-summarization-summary-type`,{type:`string`,description:`Defines the style of the summary, such as general, team meeting, or sales call.`,choices:[`general`,`team_meeting`,`sales_call`,`client_check_in`,`interview`,`daily_standup`,`one_on_one_meeting`,`lecture`,`code_review`]}).option(`ai-config-summarization-text-format`,{type:`string`,description:`Determines the text format of the summary, such as plain text or markdown.`,choices:[`plain_text`,`markdown`]}).option(`ai-config-summarization-word-limit`,{type:`number`,description:`Sets the maximum number of words in the meeting summary.`}).option(`ai-config-transcription-keywords`,{type:`string`,array:!0,description:`Adds specific terms to improve accurate detection during transcription.`}).option(`ai-config-transcription-language`,{type:`string`,description:`Specifies the language code for transcription to ensure accurate results.`,choices:[`en-US`,`en-IN`,`de`,`hi`,`sv`,`ru`,`pl`,`el`,`fr`,`nl`]}).option(`ai-config-transcription-profanity-filter`,{type:`boolean`,description:`Control the inclusion of offensive language in transcriptions.`}).option(`live-stream-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting livestreamed on start.`}).option(`persist-chat`,{type:`boolean`,description:`If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space.`}).option(`record-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting recorded as soon as someone joins the meeting.`}).option(`recording-config-audio-config-channel`,{type:`string`,description:`Audio signal pathway within an audio file that carries a specific sound source.`,choices:[`mono`,`stereo`]}).option(`recording-config-audio-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis.`,choices:[`MP3`,`AAC`]}).option(`recording-config-audio-config-export-file`,{type:`boolean`,description:`Controls whether to export audio file seperately`}).option(`recording-config-file-name-prefix`,{type:`string`,description:`Adds a prefix to the beginning of the file name of the recording.`}).option(`recording-config-live-streaming-config-rtmp-url`,{type:`string`,description:`RTMP URL to stream to`}).option(`recording-config-max-seconds`,{type:`number`,description:`Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours.`}).option(`recording-config-realtimekit-bucket-config-enabled`,{type:`boolean`,description:"Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording."}).option(`recording-config-video-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded.`,choices:[`H264`,`VP8`,`VP9`]}).option(`recording-config-video-config-export-file`,{type:`boolean`,description:`Controls whether to export video file seperately`}).option(`recording-config-video-config-height`,{type:`number`,description:`Height of the recording video in pixels`}).option(`recording-config-video-config-watermark-position`,{type:`string`,description:`Position of the watermark`,choices:[`left top`,`right top`,`left bottom`,`right bottom`]}).option(`recording-config-video-config-watermark-url`,{type:`string`,description:`URL of the watermark image`}).option(`recording-config-video-config-width`,{type:`number`,description:`Width of the recording video in pixels`}).option(`session-keep-alive-time-in-secs`,{type:`number`,description:`Time in seconds, for which a session remains active, after the last participant has left the meeting.`}).option(`summarize-on-end`,{type:`boolean`,description:`Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API.`}).option(`title`,{type:`string`,description:`Title of the meeting`}).option(`transcribe-on-end`,{type:`boolean`,description:`Automatically generate transcripts when the meeting ends.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create meeting body`}).check(e=>{if([`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-file-name-prefix`,`recording-config-live-streaming-config-rtmp-url`,`recording-config-max-seconds`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-height`,`recording-config-video-config-watermark-position`,`recording-config-video-config-watermark-url`,`recording-config-video-config-width`].some(t=>e[t]!==void 0)){let t=[`recording-config-realtimekit-bucket-config-enabled`].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 --recording_config-* flag is set`)}return!0})}const Fe={command:`replace <meeting-id>`,describe:`Replaces all the details for the given meeting ID.`,builder:Pe,handler:async d=>s({command:`realtime kit meetings replace`,classification:{safeFlags:[`ai-config-summarization-summary-type`,`ai-config-summarization-text-format`,`ai-config-transcription-language`,`ai-config-transcription-profanity-filter`,`live-stream-on-start`,`persist-chat`,`record-on-start`,`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-watermark-position`,`summarize-on-end`,`transcribe-on-end`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf realtime kit meetings replace`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({ai_config:{summarization:{summary_type:u(d[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:u(d[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:d[`ai-config-summarization-word-limit`]},transcription:{keywords:d[`ai-config-transcription-keywords`],language:u(d[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:d[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:d[`live-stream-on-start`],persist_chat:d[`persist-chat`],record_on_start:d[`record-on-start`],recording_config:{audio_config:{channel:u(d[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:u(d[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:d[`recording-config-audio-config-export-file`]},file_name_prefix:u(d[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:u(d[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:d[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:d[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:u(d[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:d[`recording-config-video-config-export-file`],height:d[`recording-config-video-config-height`],watermark:{position:u(d[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:u(d[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:d[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:d[`session-keep-alive-time-in-secs`],summarize_on_end:d[`summarize-on-end`],title:u(d.title,`title`,`text`),transcribe_on_end:d[`transcribe-on-end`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.realtime.kit.meetings.replace({...e,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Updated`});return}let p=l({ai_config:{summarization:{summary_type:u(d[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:u(d[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:d[`ai-config-summarization-word-limit`]},transcription:{keywords:d[`ai-config-transcription-keywords`],language:u(d[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:d[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:d[`live-stream-on-start`],persist_chat:d[`persist-chat`],record_on_start:d[`record-on-start`],recording_config:{audio_config:{channel:u(d[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:u(d[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:d[`recording-config-audio-config-export-file`]},file_name_prefix:u(d[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:u(d[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:d[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:d[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:u(d[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:d[`recording-config-video-config-export-file`],height:d[`recording-config-video-config-height`],watermark:{position:u(d[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:u(d[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:d[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:d[`session-keep-alive-time-in-secs`],summarize_on_end:d[`summarize-on-end`],title:u(d.title,`title`,`text`),transcribe_on_end:d[`transcribe-on-end`]});i(await o(`Updating`,async()=>s.realtime.kit.meetings.replace({...p,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Updated`})})};function Ie(e){return e.positional(`meeting-id`,{type:`string`,description:`ID of the meeting. Fetch the meeting ID using the create a meeting API.`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`ai-config-summarization-summary-type`,{type:`string`,description:`Defines the style of the summary, such as general, team meeting, or sales call.`,choices:[`general`,`team_meeting`,`sales_call`,`client_check_in`,`interview`,`daily_standup`,`one_on_one_meeting`,`lecture`,`code_review`]}).option(`ai-config-summarization-text-format`,{type:`string`,description:`Determines the text format of the summary, such as plain text or markdown.`,choices:[`plain_text`,`markdown`]}).option(`ai-config-summarization-word-limit`,{type:`number`,description:`Sets the maximum number of words in the meeting summary.`}).option(`ai-config-transcription-keywords`,{type:`string`,array:!0,description:`Adds specific terms to improve accurate detection during transcription.`}).option(`ai-config-transcription-language`,{type:`string`,description:`Specifies the language code for transcription to ensure accurate results.`,choices:[`en-US`,`en-IN`,`de`,`hi`,`sv`,`ru`,`pl`,`el`,`fr`,`nl`]}).option(`ai-config-transcription-profanity-filter`,{type:`boolean`,description:`Control the inclusion of offensive language in transcriptions.`}).option(`live-stream-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting livestreamed on start.`}).option(`persist-chat`,{type:`boolean`,description:`If a meeting is updated to persist_chat, meeting chat would remain for a week within the meeting space.`}).option(`record-on-start`,{type:`boolean`,description:`Specifies if the meeting should start getting recorded as soon as someone joins the meeting.`}).option(`recording-config-audio-config-channel`,{type:`string`,description:`Audio signal pathway within an audio file that carries a specific sound source.`,choices:[`mono`,`stereo`]}).option(`recording-config-audio-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis.`,choices:[`MP3`,`AAC`]}).option(`recording-config-audio-config-export-file`,{type:`boolean`,description:`Controls whether to export audio file seperately`}).option(`recording-config-file-name-prefix`,{type:`string`,description:`Adds a prefix to the beginning of the file name of the recording.`}).option(`recording-config-live-streaming-config-rtmp-url`,{type:`string`,description:`RTMP URL to stream to`}).option(`recording-config-max-seconds`,{type:`number`,description:`Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours.`}).option(`recording-config-realtimekit-bucket-config-enabled`,{type:`boolean`,description:"Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording."}).option(`recording-config-video-config-codec`,{type:`string`,description:`Codec using which the recording will be encoded.`,choices:[`H264`,`VP8`,`VP9`]}).option(`recording-config-video-config-export-file`,{type:`boolean`,description:`Controls whether to export video file seperately`}).option(`recording-config-video-config-height`,{type:`number`,description:`Height of the recording video in pixels`}).option(`recording-config-video-config-watermark-position`,{type:`string`,description:`Position of the watermark`,choices:[`left top`,`right top`,`left bottom`,`right bottom`]}).option(`recording-config-video-config-watermark-url`,{type:`string`,description:`URL of the watermark image`}).option(`recording-config-video-config-width`,{type:`number`,description:`Width of the recording video in pixels`}).option(`session-keep-alive-time-in-secs`,{type:`number`,description:`Time in seconds, for which a session remains active, after the last participant has left the meeting.`}).option(`status`,{type:`string`,description:"Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting.",choices:[`ACTIVE`,`INACTIVE`]}).option(`summarize-on-end`,{type:`boolean`,description:`Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API.`}).option(`title`,{type:`string`,description:`Title of the meeting`}).option(`transcribe-on-end`,{type:`boolean`,description:`Automatically generate transcripts when the meeting ends.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update meeting body`}).check(e=>{if([`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-file-name-prefix`,`recording-config-live-streaming-config-rtmp-url`,`recording-config-max-seconds`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-height`,`recording-config-video-config-watermark-position`,`recording-config-video-config-watermark-url`,`recording-config-video-config-width`].some(t=>e[t]!==void 0)){let t=[`recording-config-realtimekit-bucket-config-enabled`].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 --recording_config-* flag is set`)}return!0})}const Le={command:`update <meeting-id>`,describe:`Updates a meeting in an App for the given meeting ID.`,builder:Ie,handler:async d=>s({command:`realtime kit meetings update`,classification:{safeFlags:[`ai-config-summarization-summary-type`,`ai-config-summarization-text-format`,`ai-config-transcription-language`,`ai-config-transcription-profanity-filter`,`live-stream-on-start`,`persist-chat`,`record-on-start`,`recording-config-audio-config-channel`,`recording-config-audio-config-codec`,`recording-config-audio-config-export-file`,`recording-config-realtimekit-bucket-config-enabled`,`recording-config-video-config-codec`,`recording-config-video-config-export-file`,`recording-config-video-config-watermark-position`,`status`,`summarize-on-end`,`transcribe-on-end`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf realtime kit meetings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${d[`app-id`]==null?`<app-id>`:encodeURIComponent(String(d[`app-id`]))}/meetings/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({ai_config:{summarization:{summary_type:u(d[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:u(d[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:d[`ai-config-summarization-word-limit`]},transcription:{keywords:d[`ai-config-transcription-keywords`],language:u(d[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:d[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:d[`live-stream-on-start`],persist_chat:d[`persist-chat`],record_on_start:d[`record-on-start`],recording_config:{audio_config:{channel:u(d[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:u(d[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:d[`recording-config-audio-config-export-file`]},file_name_prefix:u(d[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:u(d[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:d[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:d[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:u(d[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:d[`recording-config-video-config-export-file`],height:d[`recording-config-video-config-height`],watermark:{position:u(d[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:u(d[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:d[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:d[`session-keep-alive-time-in-secs`],status:u(d.status,`status`,`text`),summarize_on_end:d[`summarize-on-end`],title:u(d.title,`title`,`text`),transcribe_on_end:d[`transcribe-on-end`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.realtime.kit.meetings.update({...e,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Updated`});return}let p=l({ai_config:{summarization:{summary_type:u(d[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:u(d[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:d[`ai-config-summarization-word-limit`]},transcription:{keywords:d[`ai-config-transcription-keywords`],language:u(d[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:d[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:d[`live-stream-on-start`],persist_chat:d[`persist-chat`],record_on_start:d[`record-on-start`],recording_config:{audio_config:{channel:u(d[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:u(d[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:d[`recording-config-audio-config-export-file`]},file_name_prefix:u(d[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:u(d[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:d[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:d[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:u(d[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:d[`recording-config-video-config-export-file`],height:d[`recording-config-video-config-height`],watermark:{position:u(d[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:u(d[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:d[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:d[`session-keep-alive-time-in-secs`],status:u(d.status,`status`,`text`),summarize_on_end:d[`summarize-on-end`],title:u(d.title,`title`,`text`),transcribe_on_end:d[`transcribe-on-end`]});i(await o(`Updating`,async()=>s.realtime.kit.meetings.update({...p,account_id:f,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Updated`})})},Re={command:`meetings`,describe:`Meetings, participants, access tokens, and meeting livestreams`,builder:e=>e.command(ce).command(ue).command(fe).command(Fe).command(Le).command(oe).command(_e).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ze(e){return e.positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`config-livestream-viewer-qualities`,{type:`string`,array:!0,description:`Livestream viewer quality levels.`}).option(`config-max-screenshare-count`,{type:`number`,description:`Maximum number of screen shares that can be active at a given time`}).option(`config-max-video-streams-desktop`,{type:`number`,description:`Maximum number of video streams visible on desktop devices`}).option(`config-max-video-streams-mobile`,{type:`number`,description:`Maximum number of streams visible on mobile devices`}).option(`config-media-audio-enable-high-bitrate`,{type:`boolean`,description:`Enable High Quality Audio for your meetings`}).option(`config-media-audio-enable-stereo`,{type:`boolean`,description:`Enable Stereo for your meetings`}).option(`config-media-screenshare-frame-rate`,{type:`number`,description:`Frame rate of screen share`}).option(`config-media-screenshare-quality`,{type:`string`,description:`Quality of screen share `,choices:[`hd`,`vga`,`qvga`,`fhd`,`uhd`]}).option(`config-media-video-frame-rate`,{type:`number`,description:`Frame rate of participants' video`}).option(`config-media-video-quality`,{type:`string`,description:`Video quality of participants`,choices:[`hd`,`vga`,`qvga`,`fhd`,`uhd`]}).option(`config-media-video-simulcast`,{type:`boolean`,description:`Enable simulcast for participant videos.`,default:!1}).option(`config-view-type`,{type:`string`,description:`Type of the meeting`,choices:[`GROUP_CALL`,`WEBINAR`,`AUDIO_ROOM`,`LIVESTREAM`]}).option(`name`,{type:`string`,description:`Name of the preset`}).option(`permissions-accept-stage-requests`,{type:`boolean`,description:`The permissions.accept_stage_requests field`}).option(`permissions-accept-waiting-requests`,{type:`boolean`,description:`Whether this participant can accept waiting requests`}).option(`permissions-can-accept-production-requests`,{type:`boolean`,description:`The permissions.can_accept_production_requests field`}).option(`permissions-can-change-participant-permissions`,{type:`boolean`,description:`The permissions.can_change_participant_permissions field`}).option(`permissions-can-edit-display-name`,{type:`boolean`,description:`The permissions.can_edit_display_name field`}).option(`permissions-can-livestream`,{type:`boolean`,description:`The permissions.can_livestream field`}).option(`permissions-can-record`,{type:`boolean`,description:`The permissions.can_record field`}).option(`permissions-can-spotlight`,{type:`boolean`,description:`The permissions.can_spotlight field`}).option(`permissions-chat-private-can-receive`,{type:`boolean`,description:`The permissions.chat.private.can_receive field`}).option(`permissions-chat-private-can-send`,{type:`boolean`,description:`The permissions.chat.private.can_send field`}).option(`permissions-chat-private-files`,{type:`boolean`,description:`The permissions.chat.private.files field`}).option(`permissions-chat-private-text`,{type:`boolean`,description:`The permissions.chat.private.text field`}).option(`permissions-chat-public-can-send`,{type:`boolean`,description:`Can send messages in general`}).option(`permissions-chat-public-files`,{type:`boolean`,description:`Can send file messages`}).option(`permissions-chat-public-text`,{type:`boolean`,description:`Can send text messages`}).option(`permissions-connected-meetings-can-alter-connected-meetings`,{type:`boolean`,description:`The permissions.connected_meetings.can_alter_connected_meetings field`}).option(`permissions-connected-meetings-can-switch-connected-meetings`,{type:`boolean`,description:`The permissions.connected_meetings.can_switch_connected_meetings field`}).option(`permissions-connected-meetings-can-switch-to-parent-meeting`,{type:`boolean`,description:`The permissions.connected_meetings.can_switch_to_parent_meeting field`}).option(`permissions-disable-participant-audio`,{type:`boolean`,description:`The permissions.disable_participant_audio field`}).option(`permissions-disable-participant-screensharing`,{type:`boolean`,description:`The permissions.disable_participant_screensharing field`}).option(`permissions-disable-participant-video`,{type:`boolean`,description:`The permissions.disable_participant_video field`}).option(`permissions-hidden-participant`,{type:`boolean`,description:`Whether this participant is visible to others or not`}).option(`permissions-is-recorder`,{type:`boolean`,description:`The permissions.is_recorder field`}).option(`permissions-kick-participant`,{type:`boolean`,description:`The permissions.kick_participant field`}).option(`permissions-media-audio-can-produce`,{type:`string`,description:`Can produce audio`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-media-screenshare-can-produce`,{type:`string`,description:`Can produce screen share video`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-media-video-can-produce`,{type:`string`,description:`Can produce video`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-pin-participant`,{type:`boolean`,description:`The permissions.pin_participant field`}).option(`permissions-plugins-can-close`,{type:`boolean`,description:`Can close plugins that are already open`}).option(`permissions-plugins-can-edit-config`,{type:`boolean`,description:`Can edit plugin config`}).option(`permissions-plugins-can-start`,{type:`boolean`,description:`Can start plugins`}).option(`permissions-polls-can-create`,{type:`boolean`,description:`Can create polls`}).option(`permissions-polls-can-view`,{type:`boolean`,description:`Can view polls`}).option(`permissions-polls-can-vote`,{type:`boolean`,description:`Can vote on polls`}).option(`permissions-recorder-type`,{type:`string`,description:`Type of the recording peer`,choices:[`RECORDER`,`LIVESTREAMER`,`NONE`]}).option(`permissions-show-participant-list`,{type:`boolean`,description:`The permissions.show_participant_list field`}).option(`permissions-stage-access`,{type:`string`,description:`The permissions.stage_access field`,choices:[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`]}).option(`permissions-stage-enabled`,{type:`boolean`,description:`The permissions.stage_enabled field`}).option(`permissions-transcription-enabled`,{type:`boolean`,description:`The permissions.transcription_enabled field`}).option(`permissions-waiting-room-type`,{type:`string`,description:`Waiting room type`,choices:[`SKIP`,`ON_PRIVILEGED_USER_ENTRY`,`SKIP_ON_ACCEPT`]}).option(`ui-design-tokens-border-radius`,{type:`string`,description:`The ui.design_tokens.border_radius field`,choices:[`sharp`,`rounded`,`extra-rounded`,`circular`]}).option(`ui-design-tokens-border-width`,{type:`string`,description:`The ui.design_tokens.border_width field`,choices:[`none`,`thin`,`fat`]}).option(`ui-design-tokens-colors-danger`,{type:`string`,description:`The ui.design_tokens.colors.danger field`}).option(`ui-design-tokens-colors-success`,{type:`string`,description:`The ui.design_tokens.colors.success field`}).option(`ui-design-tokens-colors-text`,{type:`string`,description:`The ui.design_tokens.colors.text field`}).option(`ui-design-tokens-colors-text-on-brand`,{type:`string`,description:`The ui.design_tokens.colors.text_on_brand field`}).option(`ui-design-tokens-colors-video-bg`,{type:`string`,description:`The ui.design_tokens.colors.video_bg field`}).option(`ui-design-tokens-colors-warning`,{type:`string`,description:`The ui.design_tokens.colors.warning field`}).option(`ui-design-tokens-font-family`,{type:`string`,description:`The ui.design_tokens.font_family field`}).option(`ui-design-tokens-google-font`,{type:`string`,description:`The ui.design_tokens.google_font field`}).option(`ui-design-tokens-logo`,{type:`string`,description:`The ui.design_tokens.logo field`}).option(`ui-design-tokens-spacing-base`,{type:`number`,description:`The ui.design_tokens.spacing_base field`}).option(`ui-design-tokens-theme`,{type:`string`,description:`The ui.design_tokens.theme field`,choices:[`darkest`,`dark`,`light`]}).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 Be={command:`create <app-id>`,describe:`Creates a preset belonging to the current App`,builder:ze,handler:async p=>s({command:`realtime kit presets create`,classification:{safeFlags:`config-media-audio-enable-high-bitrate.config-media-audio-enable-stereo.config-media-screenshare-quality.config-media-video-quality.config-media-video-simulcast.config-view-type.permissions-accept-stage-requests.permissions-accept-waiting-requests.permissions-can-accept-production-requests.permissions-can-change-participant-permissions.permissions-can-edit-display-name.permissions-can-livestream.permissions-can-record.permissions-can-spotlight.permissions-chat-private-can-receive.permissions-chat-private-can-send.permissions-chat-private-files.permissions-chat-private-text.permissions-chat-public-can-send.permissions-chat-public-files.permissions-chat-public-text.permissions-connected-meetings-can-alter-connected-meetings.permissions-connected-meetings-can-switch-connected-meetings.permissions-connected-meetings-can-switch-to-parent-meeting.permissions-disable-participant-audio.permissions-disable-participant-screensharing.permissions-disable-participant-video.permissions-hidden-participant.permissions-is-recorder.permissions-kick-participant.permissions-media-audio-can-produce.permissions-media-screenshare-can-produce.permissions-media-video-can-produce.permissions-pin-participant.permissions-plugins-can-close.permissions-plugins-can-edit-config.permissions-plugins-can-start.permissions-polls-can-create.permissions-polls-can-view.permissions-polls-can-vote.permissions-recorder-type.permissions-show-participant-list.permissions-stage-access.permissions-stage-enabled.permissions-transcription-enabled.permissions-waiting-room-type.ui-design-tokens-border-radius.ui-design-tokens-border-width.ui-design-tokens-theme.dry-run`.split(`.`)}},p,async()=>{if(p.dryRun){a({command:`cf realtime kit presets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${p[`app-id`]==null?`<app-id>`:encodeURIComponent(String(p[`app-id`]))}/presets`,pathParams:{"app-id":String(p[`app-id`]??``)},bodyKind:`json`,body:p.body===void 0?l({config:{livestream_viewer_qualities:p[`config-livestream-viewer-qualities`],max_screenshare_count:p[`config-max-screenshare-count`],max_video_streams:{desktop:p[`config-max-video-streams-desktop`],mobile:p[`config-max-video-streams-mobile`]},media:{audio:{enable_high_bitrate:p[`config-media-audio-enable-high-bitrate`],enable_stereo:p[`config-media-audio-enable-stereo`]},screenshare:{frame_rate:p[`config-media-screenshare-frame-rate`],quality:u(p[`config-media-screenshare-quality`],`config-media-screenshare-quality`,`text`)},video:{frame_rate:p[`config-media-video-frame-rate`],quality:u(p[`config-media-video-quality`],`config-media-video-quality`,`text`),simulcast:p[`config-media-video-simulcast`]}},view_type:u(p[`config-view-type`],`config-view-type`,`text`)},name:u(p.name,`name`,`text`),permissions:{accept_stage_requests:p[`permissions-accept-stage-requests`],accept_waiting_requests:p[`permissions-accept-waiting-requests`],can_accept_production_requests:p[`permissions-can-accept-production-requests`],can_change_participant_permissions:p[`permissions-can-change-participant-permissions`],can_edit_display_name:p[`permissions-can-edit-display-name`],can_livestream:p[`permissions-can-livestream`],can_record:p[`permissions-can-record`],can_spotlight:p[`permissions-can-spotlight`],chat:{private:{can_receive:p[`permissions-chat-private-can-receive`],can_send:p[`permissions-chat-private-can-send`],files:p[`permissions-chat-private-files`],text:p[`permissions-chat-private-text`]},public:{can_send:p[`permissions-chat-public-can-send`],files:p[`permissions-chat-public-files`],text:p[`permissions-chat-public-text`]}},connected_meetings:{can_alter_connected_meetings:p[`permissions-connected-meetings-can-alter-connected-meetings`],can_switch_connected_meetings:p[`permissions-connected-meetings-can-switch-connected-meetings`],can_switch_to_parent_meeting:p[`permissions-connected-meetings-can-switch-to-parent-meeting`]},disable_participant_audio:p[`permissions-disable-participant-audio`],disable_participant_screensharing:p[`permissions-disable-participant-screensharing`],disable_participant_video:p[`permissions-disable-participant-video`],hidden_participant:p[`permissions-hidden-participant`],is_recorder:p[`permissions-is-recorder`],kick_participant:p[`permissions-kick-participant`],media:{audio:{can_produce:u(p[`permissions-media-audio-can-produce`],`permissions-media-audio-can-produce`,`text`)},screenshare:{can_produce:u(p[`permissions-media-screenshare-can-produce`],`permissions-media-screenshare-can-produce`,`text`)},video:{can_produce:u(p[`permissions-media-video-can-produce`],`permissions-media-video-can-produce`,`text`)}},pin_participant:p[`permissions-pin-participant`],plugins:{can_close:p[`permissions-plugins-can-close`],can_edit_config:p[`permissions-plugins-can-edit-config`],can_start:p[`permissions-plugins-can-start`]},polls:{can_create:p[`permissions-polls-can-create`],can_view:p[`permissions-polls-can-view`],can_vote:p[`permissions-polls-can-vote`]},recorder_type:u(p[`permissions-recorder-type`],`permissions-recorder-type`,`text`),show_participant_list:p[`permissions-show-participant-list`],stage_access:u(p[`permissions-stage-access`],`permissions-stage-access`,`text`),stage_enabled:p[`permissions-stage-enabled`],transcription_enabled:p[`permissions-transcription-enabled`],waiting_room_type:u(p[`permissions-waiting-room-type`],`permissions-waiting-room-type`,`text`)},ui:{design_tokens:{border_radius:u(p[`ui-design-tokens-border-radius`],`ui-design-tokens-border-radius`,`text`),border_width:u(p[`ui-design-tokens-border-width`],`ui-design-tokens-border-width`,`text`),colors:{danger:u(p[`ui-design-tokens-colors-danger`],`ui-design-tokens-colors-danger`,`text`),success:u(p[`ui-design-tokens-colors-success`],`ui-design-tokens-colors-success`,`text`),text:u(p[`ui-design-tokens-colors-text`],`ui-design-tokens-colors-text`,`text`),text_on_brand:u(p[`ui-design-tokens-colors-text-on-brand`],`ui-design-tokens-colors-text-on-brand`,`text`),video_bg:u(p[`ui-design-tokens-colors-video-bg`],`ui-design-tokens-colors-video-bg`,`text`),warning:u(p[`ui-design-tokens-colors-warning`],`ui-design-tokens-colors-warning`,`text`)},font_family:u(p[`ui-design-tokens-font-family`],`ui-design-tokens-font-family`,`text`),google_font:u(p[`ui-design-tokens-google-font`],`ui-design-tokens-google-font`,`text`),logo:u(p[`ui-design-tokens-logo`],`ui-design-tokens-logo`,`text`),spacing_base:p[`ui-design-tokens-spacing-base`],theme:u(p[`ui-design-tokens-theme`],`ui-design-tokens-theme`,`text`)}}}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.realtime.kit.presets.create({body:e,account_id:m,app_id:p[`app-id`]})),{successLabel:`Created`});return}if(p[`config-max-screenshare-count`]===void 0)throw Error(`--config-max-screenshare-count is required (or pass --body with this field set).`);if(p[`config-max-video-streams-desktop`]===void 0)throw Error(`--config-max-video-streams-desktop is required (or pass --body with this field set).`);if(p[`config-max-video-streams-mobile`]===void 0)throw Error(`--config-max-video-streams-mobile is required (or pass --body with this field set).`);if(p[`config-media-screenshare-frame-rate`]===void 0)throw Error(`--config-media-screenshare-frame-rate is required (or pass --body with this field set).`);if(p[`config-media-screenshare-quality`]===void 0&&(p[`config-media-screenshare-quality`]=await f(`config-media-screenshare-quality`,`Quality of screen share `,[`hd`,`vga`,`qvga`,`fhd`,`uhd`])),p[`config-media-video-frame-rate`]===void 0)throw Error(`--config-media-video-frame-rate is required (or pass --body with this field set).`);if(p[`config-media-video-quality`]===void 0&&(p[`config-media-video-quality`]=await f(`config-media-video-quality`,`Video quality of participants`,[`hd`,`vga`,`qvga`,`fhd`,`uhd`])),p[`config-view-type`]===void 0&&(p[`config-view-type`]=await f(`config-view-type`,`Type of the meeting`,[`GROUP_CALL`,`WEBINAR`,`AUDIO_ROOM`,`LIVESTREAM`])),p.name===void 0&&(p.name=await d(`name`,`Name of the preset`)),p[`permissions-accept-waiting-requests`]===void 0)throw Error(`--permissions-accept-waiting-requests is required (or pass --body with this field set).`);if(p[`permissions-can-accept-production-requests`]===void 0)throw Error(`--permissions-can-accept-production-requests is required (or pass --body with this field set).`);if(p[`permissions-can-change-participant-permissions`]===void 0)throw Error(`--permissions-can-change-participant-permissions is required (or pass --body with this field set).`);if(p[`permissions-can-edit-display-name`]===void 0)throw Error(`--permissions-can-edit-display-name is required (or pass --body with this field set).`);if(p[`permissions-can-livestream`]===void 0)throw Error(`--permissions-can-livestream is required (or pass --body with this field set).`);if(p[`permissions-can-record`]===void 0)throw Error(`--permissions-can-record is required (or pass --body with this field set).`);if(p[`permissions-can-spotlight`]===void 0)throw Error(`--permissions-can-spotlight is required (or pass --body with this field set).`);if(p[`permissions-chat-private-can-receive`]===void 0)throw Error(`--permissions-chat-private-can-receive is required (or pass --body with this field set).`);if(p[`permissions-chat-private-can-send`]===void 0)throw Error(`--permissions-chat-private-can-send is required (or pass --body with this field set).`);if(p[`permissions-chat-private-files`]===void 0)throw Error(`--permissions-chat-private-files is required (or pass --body with this field set).`);if(p[`permissions-chat-private-text`]===void 0)throw Error(`--permissions-chat-private-text is required (or pass --body with this field set).`);if(p[`permissions-chat-public-can-send`]===void 0)throw Error(`--permissions-chat-public-can-send is required (or pass --body with this field set).`);if(p[`permissions-chat-public-files`]===void 0)throw Error(`--permissions-chat-public-files is required (or pass --body with this field set).`);if(p[`permissions-chat-public-text`]===void 0)throw Error(`--permissions-chat-public-text is required (or pass --body with this field set).`);if(p[`permissions-connected-meetings-can-alter-connected-meetings`]===void 0)throw Error(`--permissions-connected-meetings-can-alter-connected-meetings is required (or pass --body with this field set).`);if(p[`permissions-connected-meetings-can-switch-connected-meetings`]===void 0)throw Error(`--permissions-connected-meetings-can-switch-connected-meetings is required (or pass --body with this field set).`);if(p[`permissions-connected-meetings-can-switch-to-parent-meeting`]===void 0)throw Error(`--permissions-connected-meetings-can-switch-to-parent-meeting is required (or pass --body with this field set).`);if(p[`permissions-disable-participant-audio`]===void 0)throw Error(`--permissions-disable-participant-audio is required (or pass --body with this field set).`);if(p[`permissions-disable-participant-screensharing`]===void 0)throw Error(`--permissions-disable-participant-screensharing is required (or pass --body with this field set).`);if(p[`permissions-disable-participant-video`]===void 0)throw Error(`--permissions-disable-participant-video is required (or pass --body with this field set).`);if(p[`permissions-hidden-participant`]===void 0)throw Error(`--permissions-hidden-participant is required (or pass --body with this field set).`);if(p[`permissions-kick-participant`]===void 0)throw Error(`--permissions-kick-participant is required (or pass --body with this field set).`);if(p[`permissions-media-audio-can-produce`]===void 0&&(p[`permissions-media-audio-can-produce`]=await f(`permissions-media-audio-can-produce`,`Can produce audio`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),p[`permissions-media-screenshare-can-produce`]===void 0&&(p[`permissions-media-screenshare-can-produce`]=await f(`permissions-media-screenshare-can-produce`,`Can produce screen share video`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),p[`permissions-media-video-can-produce`]===void 0&&(p[`permissions-media-video-can-produce`]=await f(`permissions-media-video-can-produce`,`Can produce video`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),p[`permissions-pin-participant`]===void 0)throw Error(`--permissions-pin-participant is required (or pass --body with this field set).`);if(p[`permissions-plugins-can-close`]===void 0)throw Error(`--permissions-plugins-can-close is required (or pass --body with this field set).`);if(p[`permissions-plugins-can-edit-config`]===void 0)throw Error(`--permissions-plugins-can-edit-config is required (or pass --body with this field set).`);if(p[`permissions-plugins-can-start`]===void 0)throw Error(`--permissions-plugins-can-start is required (or pass --body with this field set).`);if(p[`permissions-polls-can-create`]===void 0)throw Error(`--permissions-polls-can-create is required (or pass --body with this field set).`);if(p[`permissions-polls-can-view`]===void 0)throw Error(`--permissions-polls-can-view is required (or pass --body with this field set).`);if(p[`permissions-polls-can-vote`]===void 0)throw Error(`--permissions-polls-can-vote is required (or pass --body with this field set).`);if(p[`permissions-recorder-type`]===void 0&&(p[`permissions-recorder-type`]=await f(`permissions-recorder-type`,`Type of the recording peer`,[`RECORDER`,`LIVESTREAMER`,`NONE`])),p[`permissions-show-participant-list`]===void 0)throw Error(`--permissions-show-participant-list is required (or pass --body with this field set).`);if(p[`permissions-waiting-room-type`]===void 0&&(p[`permissions-waiting-room-type`]=await f(`permissions-waiting-room-type`,`Waiting room type`,[`SKIP`,`ON_PRIVILEGED_USER_ENTRY`,`SKIP_ON_ACCEPT`])),p[`ui-design-tokens-border-radius`]===void 0&&(p[`ui-design-tokens-border-radius`]=await f(`ui-design-tokens-border-radius`,`The ui.design_tokens.border_radius field`,[`sharp`,`rounded`,`extra-rounded`,`circular`])),p[`ui-design-tokens-border-width`]===void 0&&(p[`ui-design-tokens-border-width`]=await f(`ui-design-tokens-border-width`,`The ui.design_tokens.border_width field`,[`none`,`thin`,`fat`])),p[`ui-design-tokens-colors-danger`]===void 0&&(p[`ui-design-tokens-colors-danger`]=await d(`ui-design-tokens-colors-danger`,`The ui.design_tokens.colors.danger field`)),p[`ui-design-tokens-colors-success`]===void 0&&(p[`ui-design-tokens-colors-success`]=await d(`ui-design-tokens-colors-success`,`The ui.design_tokens.colors.success field`)),p[`ui-design-tokens-colors-text`]===void 0&&(p[`ui-design-tokens-colors-text`]=await d(`ui-design-tokens-colors-text`,`The ui.design_tokens.colors.text field`)),p[`ui-design-tokens-colors-text-on-brand`]===void 0&&(p[`ui-design-tokens-colors-text-on-brand`]=await d(`ui-design-tokens-colors-text-on-brand`,`The ui.design_tokens.colors.text_on_brand field`)),p[`ui-design-tokens-colors-video-bg`]===void 0&&(p[`ui-design-tokens-colors-video-bg`]=await d(`ui-design-tokens-colors-video-bg`,`The ui.design_tokens.colors.video_bg field`)),p[`ui-design-tokens-colors-warning`]===void 0&&(p[`ui-design-tokens-colors-warning`]=await d(`ui-design-tokens-colors-warning`,`The ui.design_tokens.colors.warning field`)),p[`ui-design-tokens-spacing-base`]===void 0)throw Error(`--ui-design-tokens-spacing-base is required (or pass --body with this field set).`);p[`ui-design-tokens-theme`]===void 0&&(p[`ui-design-tokens-theme`]=await f(`ui-design-tokens-theme`,`The ui.design_tokens.theme field`,[`darkest`,`dark`,`light`]));let h=l({config:{livestream_viewer_qualities:p[`config-livestream-viewer-qualities`],max_screenshare_count:p[`config-max-screenshare-count`],max_video_streams:{desktop:p[`config-max-video-streams-desktop`],mobile:p[`config-max-video-streams-mobile`]},media:{audio:{enable_high_bitrate:p[`config-media-audio-enable-high-bitrate`],enable_stereo:p[`config-media-audio-enable-stereo`]},screenshare:{frame_rate:p[`config-media-screenshare-frame-rate`],quality:u(p[`config-media-screenshare-quality`],`config-media-screenshare-quality`,`text`)},video:{frame_rate:p[`config-media-video-frame-rate`],quality:u(p[`config-media-video-quality`],`config-media-video-quality`,`text`),simulcast:p[`config-media-video-simulcast`]}},view_type:u(p[`config-view-type`],`config-view-type`,`text`)},name:u(p.name,`name`,`text`),permissions:{accept_stage_requests:p[`permissions-accept-stage-requests`],accept_waiting_requests:p[`permissions-accept-waiting-requests`],can_accept_production_requests:p[`permissions-can-accept-production-requests`],can_change_participant_permissions:p[`permissions-can-change-participant-permissions`],can_edit_display_name:p[`permissions-can-edit-display-name`],can_livestream:p[`permissions-can-livestream`],can_record:p[`permissions-can-record`],can_spotlight:p[`permissions-can-spotlight`],chat:{private:{can_receive:p[`permissions-chat-private-can-receive`],can_send:p[`permissions-chat-private-can-send`],files:p[`permissions-chat-private-files`],text:p[`permissions-chat-private-text`]},public:{can_send:p[`permissions-chat-public-can-send`],files:p[`permissions-chat-public-files`],text:p[`permissions-chat-public-text`]}},connected_meetings:{can_alter_connected_meetings:p[`permissions-connected-meetings-can-alter-connected-meetings`],can_switch_connected_meetings:p[`permissions-connected-meetings-can-switch-connected-meetings`],can_switch_to_parent_meeting:p[`permissions-connected-meetings-can-switch-to-parent-meeting`]},disable_participant_audio:p[`permissions-disable-participant-audio`],disable_participant_screensharing:p[`permissions-disable-participant-screensharing`],disable_participant_video:p[`permissions-disable-participant-video`],hidden_participant:p[`permissions-hidden-participant`],is_recorder:p[`permissions-is-recorder`],kick_participant:p[`permissions-kick-participant`],media:{audio:{can_produce:u(p[`permissions-media-audio-can-produce`],`permissions-media-audio-can-produce`,`text`)},screenshare:{can_produce:u(p[`permissions-media-screenshare-can-produce`],`permissions-media-screenshare-can-produce`,`text`)},video:{can_produce:u(p[`permissions-media-video-can-produce`],`permissions-media-video-can-produce`,`text`)}},pin_participant:p[`permissions-pin-participant`],plugins:{can_close:p[`permissions-plugins-can-close`],can_edit_config:p[`permissions-plugins-can-edit-config`],can_start:p[`permissions-plugins-can-start`]},polls:{can_create:p[`permissions-polls-can-create`],can_view:p[`permissions-polls-can-view`],can_vote:p[`permissions-polls-can-vote`]},recorder_type:u(p[`permissions-recorder-type`],`permissions-recorder-type`,`text`),show_participant_list:p[`permissions-show-participant-list`],stage_access:u(p[`permissions-stage-access`],`permissions-stage-access`,`text`),stage_enabled:p[`permissions-stage-enabled`],transcription_enabled:p[`permissions-transcription-enabled`],waiting_room_type:u(p[`permissions-waiting-room-type`],`permissions-waiting-room-type`,`text`)},ui:{design_tokens:{border_radius:u(p[`ui-design-tokens-border-radius`],`ui-design-tokens-border-radius`,`text`),border_width:u(p[`ui-design-tokens-border-width`],`ui-design-tokens-border-width`,`text`),colors:{danger:u(p[`ui-design-tokens-colors-danger`],`ui-design-tokens-colors-danger`,`text`),success:u(p[`ui-design-tokens-colors-success`],`ui-design-tokens-colors-success`,`text`),text:u(p[`ui-design-tokens-colors-text`],`ui-design-tokens-colors-text`,`text`),text_on_brand:u(p[`ui-design-tokens-colors-text-on-brand`],`ui-design-tokens-colors-text-on-brand`,`text`),video_bg:u(p[`ui-design-tokens-colors-video-bg`],`ui-design-tokens-colors-video-bg`,`text`),warning:u(p[`ui-design-tokens-colors-warning`],`ui-design-tokens-colors-warning`,`text`)},font_family:u(p[`ui-design-tokens-font-family`],`ui-design-tokens-font-family`,`text`),google_font:u(p[`ui-design-tokens-google-font`],`ui-design-tokens-google-font`,`text`),logo:u(p[`ui-design-tokens-logo`],`ui-design-tokens-logo`,`text`),spacing_base:p[`ui-design-tokens-spacing-base`],theme:u(p[`ui-design-tokens-theme`],`ui-design-tokens-theme`,`text`)}}});i(await o(`Creating`,async()=>s.realtime.kit.presets.create({body:h,account_id:m,app_id:p[`app-id`]})),{successLabel:`Created`})})};function Ve(e){return e.positional(`preset-id`,{type:`string`,description:`ID of the preset to fetch`,demandOption:!0}).option(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const He={command:`delete <preset-id>`,describe:`Deletes a preset using the provided preset ID`,builder:Ve,handler:async c=>s({command:`realtime kit presets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf realtime kit presets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/presets/${c[`preset-id`]==null?`<preset-id>`:encodeURIComponent(String(c[`preset-id`]))}`,pathParams:{"app-id":String(c[`app-id`]??``),"preset-id":String(c[`preset-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation permanently deletes the preset.`})){process.stderr.write(`Aborted.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e}from"./theme-CeVf-5qG.mjs";import{n as t,t as n}from"./local-
|
|
2
|
+
import{a as e}from"./theme-CeVf-5qG.mjs";import{n as t,t as n}from"./local-BwL_gesw.mjs";import{f as r,g as i}from"./oauth-BdVr2hJp.mjs";import{a,o,r as s}from"./auth-DWxtJ918.mjs";import{t as c}from"./output-Z2lQmPUW.mjs";import{t as l}from"./dry-run-YSQndLvt.mjs";import{t as u}from"./progress-a5IKeKni.mjs";import{r as d,t as f}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{i as p,n as m,t as h}from"./body-parser-Cmw7PZ7a.mjs";import{n as g}from"./input-validation-nF-0Ze2h.mjs";import{a as _,i as v,n as ee,o as y,r as b}from"./prompt-BP8XrQSj.mjs";import{t as x}from"./cli-types-abvWQN3T.mjs";import{_ as S,a as C,c as w,d as T,g as E,h as D,i as O,m as k,o as A,p as j,r as M,s as te,t as N,u as ne}from"./schema-flags-CUGxFeZe.mjs";import{isDeepStrictEqual as re}from"node:util";import{domainToASCII as ie}from"node:url";function ae(e){return e.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 oe={command:`get <extension>`,describe:"Returns 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.",builder:ae,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function se(e){return e.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 ce={command:`list`,describe:"Returns metadata and JSON Schema documents describing the expected input structure for registration 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.",builder:x(se),handler:async e=>f({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){l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.extensions.list({account_id:o,...t})),{successLabel:`Loaded`})})},le={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(oe).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};async function P(e,t,n){let r=y(n),i=ie(n.trim().replace(/\.$/,``)).toLowerCase(),a=await u(`Checking availability`,()=>e.registrar.registrations.check({account_id:t,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?``:` (${y(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 ue(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function de(e,t,n,r){let i;try{i=r===void 0?await n.registrar.extensions.get({account_id:t,extension:e}):await n.registrar.extensions.get({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]:ue(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 de(e,n,o,a);if(c.ok)return S(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 fe=new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),pe={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function me(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function he(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 L(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function R(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function ge(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=R(n,e),i=L(t),a=me(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 _e(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:me(pe,n)??he(n)).join(` · `)}function z(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&fe.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...z(a,t,e));continue}let o=R(t,e);r.push([_e(e,o),ge(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function B(e,t,n){if(Object.hasOwn(e,n))return L(e[n]);let r=ve(t,n);return r===void 0?`API default`:`${L(r)} (default)`}function V(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(V)]}function H(e,t){return e===void 0?[]:[...V(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>H(e,t))]}function ve(e,t){let n=H(e,t),r=n[0];return n.length>0&&n.every(e=>re(e,r))?r:void 0}function U(t){let n=t.map(([e,t])=>[y(e),y(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 ye(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`,B(t.body,t.schema,`auto_renew`)],[`Privacy mode`,B(t.body,t.schema,`privacy_mode`)]],r=z(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...U(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...U(r)]:[],`│`].join(`
|
|
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 ce={command:`list`,describe:"Returns 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.",builder:x(se),handler:async e=>f({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){l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.extensions.list({account_id:o,...t})),{successLabel:`Loaded`})})},le={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(oe).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};async function P(e,t,n){let r=y(n),i=ie(n.trim().replace(/\.$/,``)).toLowerCase(),a=await u(`Checking availability`,()=>e.registrar.registrations.check({account_id:t,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?``:` (${y(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 ue(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function de(e,t,n,r){let i;try{i=r===void 0?await n.registrar.extensions.get({account_id:t,extension:e}):await n.registrar.extensions.get({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]:ue(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 de(e,n,o,a);if(c.ok)return S(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 fe=new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),pe={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function me(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function he(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 L(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function R(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function ge(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=R(n,e),i=L(t),a=me(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 _e(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:me(pe,n)??he(n)).join(` · `)}function z(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&fe.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...z(a,t,e));continue}let o=R(t,e);r.push([_e(e,o),ge(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function B(e,t,n){if(Object.hasOwn(e,n))return L(e[n]);let r=ve(t,n);return r===void 0?`API default`:`${L(r)} (default)`}function V(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(V)]}function H(e,t){return e===void 0?[]:[...V(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>H(e,t))]}function ve(e,t){let n=H(e,t),r=n[0];return n.length>0&&n.every(e=>re(e,r))?r:void 0}function U(t){let n=t.map(([e,t])=>[y(e),y(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 ye(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`,B(t.body,t.schema,`auto_renew`)],[`Privacy mode`,B(t.body,t.schema,`privacy_mode`)]],r=z(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...U(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...U(r)]:[],`│`].join(`
|
|
5
5
|
`)}const W=[`domain_name`],G=`Fully qualified domain name to register, e.g. example.travel`,K=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function be(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function xe(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 Se(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 Ce(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:y(n);return{path:be(e.path),flag:`--${e.name}`,question:te(e),description:r,choices:Se(e)?.map(t=>{let n=String(t);return{value:t,label:y(e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function q(e,t,n,r,i){let a=C(n,r);return a.length===0?!1:(c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. Additional registration input is required.`,domainName:e,extension:t,missingFields:a.map(Ce),validationErrors:i}),!0)}function J(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function we(e,t){let n=J(e.registration_cost),r=J(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 Te(e,t){let n=we(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&&M(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(M)?a.filter(e=>ke(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 Ee(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=Ee(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function De(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=Ee(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 Oe(e){return e.flatMap(e=>$(e).map(t=>({schema:e,candidate:De(t)})))}function ke(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 Ae(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?[]:Oe(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=Oe(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=T(e,t.value);return n===void 0?!0:(c??=n,!1)});if(M(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 je;function Me(e){let t=g(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function Ne(e){return je=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 Pe(t){je?.showHelp(`log`);let n=Me(t[`domain-name`]);if(!n)return;let r=y(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let i=Date.now()+j,a=await o(i);if(!a){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,a,()=>s(t),i);console.log(c.ok?`\n${A(w(c.schema,{exclude:[W]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${y(c.reason)}.`)}`)}async function Fe(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=te(e);if(e.type===`boolean`&&e.schema.const===!0){let r=y(e.schema.description??n);if(!await b(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await v(e.name,r,e.choices,e.choiceLabels):t[e.name]=await _(e.name,r,{validate:t=>ne(e,t)})}}}function Ie(e){let t=m(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function Le(e){let t;if(e.startsWith(`@`))t=g(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 Re=d({command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:Ne,handler:async e=>{if(e.help){await Pe(e);return}if(e.local)throw Error(t);let n={};e.prefer!==void 0&&(n.Prefer=String(e.prefer));let o;if(e.body!==void 0){let t=N([],e,{reserved:K}).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.`);o=Ie(e.body)}let d=e.contacts===void 0?void 0:Le(e.contacts),f=Me(e[`domain-name`]),p=o?.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 '${y(f)}' does not match --body domain_name '${y(p)}'`);let m=f??p;if(!m){if(o!==void 0){c({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:G}],validationErrors:["`/domain_name` is required"]});return}m=await _(`domain-name`,G)}let h=y(m);o&&(o.domain_name=m);let g=e.dryRun?await i()??`<account-id>`:await r(),v,b=async()=>(v||=await s(e),v);e.dryRun||await P(await b(),g,m);let x=await I(m,e.extension,g,b);if(!x.ok)throw Error(`Could not load the registration schema for ${h}: ${y(x.reason)}.`);let S=y(x.extension),C=x.schema,E=w(x.schema,{exclude:[W]});if(!o){if(d!==void 0&&xe(`contacts`,E,e))throw Error(`--contacts cannot be combined with --contacts-* fields. Pass one or the other.`);let t={...e},n=d===void 0?void 0:{contacts:d};if(n!==void 0&&delete t.contacts,!await Fe(E,t,n))return;let r=N(E,t,{reserved:K,baseBody:n});if(r.errors.length>0)throw Error(`${r.errors.join(`
|
|
6
6
|
`)}\n\nRun \`cf registrar registrations create ${h} --help\` for .${S}'s registration fields.`);o={domain_name:m,...r.body}}let D;try{D=Ae(o,C)}catch(e){let t=T(C,o);if(q(m,x.extension,E,o,t))return;throw e}let O=T(C,o);if(q(m,x.extension,E,o,O))return;if(O.length>0)throw Error(`${O.join(`
|
|
7
7
|
`)}\n\nRun \`cf registrar registrations create ${h} --help\` for this extension's registration fields.`);if(e.dryRun){l({command:`cf registrar registrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${g}/registrar/registrations`,pathParams:{},bodyKind:`json`,body:o});return}let k=await P(await b(),g,m),A=Te(k,D);if(e.force||process.stderr.write(`${ye({domain:m,accountId:g,years:D,quotedCost:A,pricing:k,body:o,schema:C,descriptors:E})}\n`),!await ee({force:e.force,message:`Registering ${h} for ${D} ${D===1?`year`:`years`} costs ${A}, charges the account's default payment method, and cannot be refunded.`}))return;if(o.years!==D)throw Error(`The registration term changed after confirmation, so cf will not submit this registration.`);let j=await P(await b(),g,m);if(j.currency!==k.currency||j.registration_cost!==k.registration_cost||j.renewal_cost!==k.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 M=await b();e.accountId=g,c(await u(`Registering`,async()=>a(M,`POST`,`/accounts/${g}/registrar/registrations`,{body:o,headers:Object.keys(n).length>0?n:void 0})),{successLabel:`Registered ${h}`})}},{command:`registrar registrations create`,recordArgs:!1});function ze(e){return e.positional(`domains`,{type:`string`,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 Be={command:`check <domains>`,describe:"Performs 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.",builder:ze,handler:async e=>f({command:`registrar registrations check`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/domain-check`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:m(e.body)});return}let t=await s(e),a=e.local?n:await r();if(e.accountId=a,e.body){let n=m(e.body);c(await u(`Creating`,async()=>t.registrar.registrations.check({...n,account_id:a})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Ve(e){return e.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 He={command:`get-registration-status <domain-name>`,describe:"Returns 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. } ```",builder:Ve,handler:async e=>f({command:`registrar registrations get-registration-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-registration-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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 s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getRegistrationStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Ue(e){return e.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 We={command:`get-transfer-status <domain-name>`,describe:"Returns 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.",builder:Ue,handler:async e=>f({command:`registrar registrations get-transfer-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-transfer-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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 s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getTransferStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Ge(e){return e.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 Ke={command:`get-update-status <domain-name>`,describe:"Returns 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.",builder:Ge,handler:async e=>f({command:`registrar registrations get-update-status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get-update-status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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 s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.getUpdateStatus({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function qe(e){return e.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 Je={command:`get <domain-name>`,describe:"Returns 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.",builder:qe,handler:async e=>f({command:`registrar registrations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar registrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<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 s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.registrations.get({account_id:a,domain_name:e[`domain-name`]})),{successLabel:`Loaded`})})};function Ye(e){return e.option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{a as r,r as i}from"./auth-DWxtJ918.mjs";import{t as a}from"./output-Z2lQmPUW.mjs";import{t as o}from"./dry-run-YSQndLvt.mjs";import{t as s}from"./progress-a5IKeKni.mjs";import{t as c}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{i as l,n as u,t as d}from"./body-parser-Cmw7PZ7a.mjs";import{n as f}from"./input-validation-nF-0Ze2h.mjs";import{a as p}from"./prompt-BP8XrQSj.mjs";import{t as m}from"./cli-types-abvWQN3T.mjs";function h(e){return e.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 g={command:`get <extension>`,describe:"Returns 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.",builder:h,handler:async r=>c({command:`registrar-sandbox extensions get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/extensions/${r.extension==null?`<extension>`:encodeURIComponent(String(r.extension))}`,pathParams:{extension:String(r.extension??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.registrarSandbox.extensions.get({account_id:l,extension:r.extension})),{successLabel:`Loaded`})})};function _(e){return e.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 v={command:`list`,describe:"Returns metadata and JSON Schema documents describing the expected input structure for registration 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.",builder:m(_),handler:async r=>c({command:`registrar-sandbox extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},r,async()=>{let c={name:r.name,cursor:r.cursor,per_page:r[`per-page`],direction:r.direction,sort_by:r[`sort-by`]};if(r.dryRun){o({command:`cf registrar-sandbox extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/extensions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.registrarSandbox.extensions.list({account_id:u,...c})),{successLabel:`Loaded`})})},y={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.positional(`domains`,{type:`string`,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 x={command:`check <domains>`,describe:"Performs 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.",builder:b,handler:async r=>c({command:`registrar-sandbox registrations check`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/domain-check`,pathParams:{},bodyKind:`json`,body:r.body===void 0?void 0:u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.registrarSandbox.registrations.check({...e,account_id:l})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function S(e){return e.option(`prefer`,{type:`string`,description:`Set to \`respond-async\` to receive an immediate \`202 Accepted\` without
|
|
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 v={command:`list`,describe:"Returns 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.",builder:m(_),handler:async r=>c({command:`registrar-sandbox extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},r,async()=>{let c={name:r.name,cursor:r.cursor,per_page:r[`per-page`],direction:r.direction,sort_by:r[`sort-by`]};if(r.dryRun){o({command:`cf registrar-sandbox extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/extensions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.registrarSandbox.extensions.list({account_id:u,...c})),{successLabel:`Loaded`})})},y={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.positional(`domains`,{type:`string`,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 x={command:`check <domains>`,describe:"Performs 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.",builder:b,handler:async r=>c({command:`registrar-sandbox registrations check`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/domain-check`,pathParams:{},bodyKind:`json`,body:r.body===void 0?void 0:u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.registrarSandbox.registrations.check({...e,account_id:l})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function S(e){return e.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
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./cf-
|
|
2
|
+
import{i as e}from"./cf-BV2HLCQm.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,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{r}from"./auth-DWxtJ918.mjs";import{t as i}from"./output-Z2lQmPUW.mjs";import{t as a}from"./dry-run-YSQndLvt.mjs";import{t as o}from"./progress-a5IKeKni.mjs";import{t as s}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as c}from"./body-parser-Cmw7PZ7a.mjs";function l(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Gets the industry classification for an account.`,builder:l,handler:async c=>s({command:`reporting industry get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting industry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/industry`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.industry.get({account_id:l})),{successLabel:`Loaded`})})};function d(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`update`,describe:`Updates the industry classification for an account.`,builder:d,handler:async l=>s({command:`reporting industry update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf reporting industry update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/industry`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.reporting.industry.update({...e,account_id:u})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},p={command:`industry`,describe:`Operations for industry`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.positional(`policy-id`,{type:`string`,description:`Unique identifier for the policy (UUID format)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <policy-id>`,describe:`Gets a reporting policy by identifier.`,builder:m,handler:async c=>s({command:`reporting policies get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/policies/${c[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(c[`policy-id`]))}`,pathParams:{"policy-id":String(c[`policy-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.policies.get({account_id:l,policy_id:c[`policy-id`]})),{successLabel:`Loaded`})})};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Lists all reporting policies for an account.`,builder:g,handler:async c=>s({command:`reporting policies list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/policies`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.policies.list({account_id:l})),{successLabel:`Loaded`})})},v={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.positional(`report-id`,{type:`string`,description:`Unique report identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <report-id>`,describe:`Gets a generated report by identifier.`,builder:y,handler:async c=>s({command:`reporting reports get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/reports/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}`,pathParams:{"report-id":String(c[`report-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.reports.get({account_id:l,report_id:c[`report-id`]})),{successLabel:`Loaded`})})};function x(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`Lists all generated reports for an account.`,builder:x,handler:async c=>s({command:`reporting reports list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf reporting reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/reports`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.reporting.reports.list({account_id:l})),{successLabel:`Loaded`})})},C={command:`reports`,describe:`Operations for reports`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`reporting`,describe:`reporting`,builder:e=>e.command(p).command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{o as e}from"./lifecycle-CadF_i2n.mjs";import{i as t,t as n}from"./interactive-CGOh-aYq.mjs";const r=new Set([``,`0`,`false`,`no`,`off`]);function i(e,t){let n=e[t];if(typeof n!=`string`)return;let i=n.trim();return r.has(i.toLowerCase())?void 0:i}function a(e,t,n){return e[t]===n}function o(e,t,n){return t&&e.push(n),t}function s(e,t,n={}){return{harness:e,...n,signals:t}}const c=[e=>a(e,`OPENCODE`,`1`)?s({id:`opencode`,name:`OpenCode`},[`OPENCODE`]):null,e=>{let t=i(e,`QWEN_CODE_SESSION_ID`);if(!t)return null;let n=[`QWEN_CODE_SESSION_ID`],r=i(e,`QWEN_CODE_MODEL`),a=i(e,`QWEN_CODE_AGENT_ID`),o=i(e,`QWEN_CODE_PROMPT_ID`);return r&&n.push(`QWEN_CODE_MODEL`),a&&n.push(`QWEN_CODE_AGENT_ID`),o&&n.push(`QWEN_CODE_PROMPT_ID`),s({id:`qwen-code`,name:`Qwen Code`},n,{model:r?{id:r}:void 0,sessionId:t,invocationId:a??o})},e=>{let t=[],n=o(t,a(e,`PI_CODING_AGENT`,`true`),`PI_CODING_AGENT`),r=o(t,a(e,`AI_AGENT`,`pi`),`AI_AGENT`);if(!n&&!r)return null;let c=i(e,`PI_SESSION_ID`),l=i(e,`PI_PROVIDER`),u=i(e,`PI_MODEL`);return c&&t.push(`PI_SESSION_ID`),l&&t.push(`PI_PROVIDER`),u&&t.push(`PI_MODEL`),s({id:`pi`,name:`Pi`},t,{model:u?{id:u,provider:l}:void 0,sessionId:c})},e=>{if(!a(e,`CURSOR_AGENT`,`1`))return null;let t=[`CURSOR_AGENT`],n=i(e,`CURSOR_CONVERSATION_ID`),r=i(e,`CURSOR_TRACE_ID`);return n&&t.push(`CURSOR_CONVERSATION_ID`),r&&t.push(`CURSOR_TRACE_ID`),s({id:`cursor-agent`,name:`Cursor Agent`},t,{sessionId:n,invocationId:r})},e=>{if(!a(e,`CLAUDECODE`,`1`))return null;let t=[`CLAUDECODE`],n=i(e,`CLAUDE_CODE_SESSION_ID`);return n&&t.push(`CLAUDE_CODE_SESSION_ID`),s({id:`claude-code`,name:`Claude Code`},t,{sessionId:n})},e=>{let t=i(e,`CODEX_THREAD_ID`);return t?s({id:`codex`,name:`OpenAI Codex`},[`CODEX_THREAD_ID`],{sessionId:t}):null},e=>{let t=i(e,`AMP_CURRENT_THREAD_ID`);return t?s({id:`amp`,name:`Amp`},[`AMP_CURRENT_THREAD_ID`],{sessionId:t}):null},e=>a(e,`GEMINI_CLI`,`1`)?s({id:`gemini-agent`,name:`Gemini CLI`},[`GEMINI_CLI`]):null,e=>a(e,`AUGMENT_AGENT`,`1`)?s({id:`auggie`,name:`Auggie`},[`AUGMENT_AGENT`]):null,e=>{let t=[],n=o(t,a(e,`CRUSH`,`1`),`CRUSH`),r=o(t,a(e,`AI_AGENT`,`crush`),`AI_AGENT`);return n||r?s({id:`crush`,name:`Crush`},t):null},e=>{let t=[],n=o(t,a(e,`AI_AGENT`,`github_copilot_vscode_agent`),`AI_AGENT`),r=o(t,a(e,`COPILOT_AGENT`,`1`),`COPILOT_AGENT`);return n||r?s({id:`vscode-copilot-agent`,name:`GitHub Copilot in VS Code`,surface:`vscode`},t):null},e=>{let t=i(e,`OZ_RUN_ID`);return t?s({id:`warp`,name:`Warp`},[`OZ_RUN_ID`],{sessionId:t}):null}];function l(e=process.env,t=c){let n=[];for(let r of t)try{let t=r(e);t&&n.push(t)}catch{}return{isAgentic:n.length>0,harness:n[0]?.harness??null,model:n.find(e=>e.model)?.model??null,sessionId:n.find(e=>e.sessionId)?.sessionId??null,invocationId:n.find(e=>e.invocationId)?.invocationId??null,matches:n}}function u(){return n?`ci`:t()?`interactive`:`non-interactive`}function d(){let t=l(),n=t.isAgentic&&t.harness!==null?{"X-CF-CLI-Agent":t.harness.id}:{};return{"User-Agent":e,"X-CF-CLI-Mode":u(),...n}}export{d as n,l as r,u as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-BwL_gesw.mjs";import{f as t,g as n}from"./oauth-BdVr2hJp.mjs";import{r}from"./auth-DWxtJ918.mjs";import{t as i}from"./output-Z2lQmPUW.mjs";import{t as a}from"./dry-run-YSQndLvt.mjs";import{t as o}from"./progress-a5IKeKni.mjs";import{t as s}from"./run-BS8otL3u.mjs";import"./telemetry-n3NJourL.mjs";import{n as c,t as l}from"./body-parser-Cmw7PZ7a.mjs";import{n as u}from"./input-validation-nF-0Ze2h.mjs";import{a as d}from"./prompt-BP8XrQSj.mjs";function f(e){return e.option(`body-base64`,{type:`string`,description:`Base64 encoded request body`}).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(`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 p={command:`create`,describe:`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.`,builder:f,handler:async f=>s({command:`request-tracers traces create`,classification:{safeFlags:[`context-geoloc-is-eu-country`,`context-skip-challenge`,`skip-response`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf request-tracers traces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/request-tracer/trace`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.requestTracers.traces.create({...e,account_id:p})),{successLabel:`Created`});return}f.method===void 0&&(f.method=await d(`method`,`HTTP Method of tracing request`)),f.url===void 0&&(f.url=await d(`url`,`URL to which perform tracing request`));let m=l({body:{base64:u(f[`body-base64`],`body-base64`,`text`),plain_text:u(f[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:f[`context-bot-score`],geoloc:{city:u(f[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:u(f[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:f[`context-geoloc-is-eu-country`],iso_code:u(f[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:f[`context-geoloc-latitude`],longitude:f[`context-geoloc-longitude`],postal_code:u(f[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:u(f[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:u(f[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:u(f[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:f[`context-skip-challenge`],threat_score:f[`context-threat-score`]},method:u(f.method,`method`,`text`),protocol:u(f.protocol,`protocol`,`text`),skip_response:f[`skip-response`],url:u(f.url,`url`,`text`)});i(await o(`Creating`,async()=>s.requestTracers.traces.create({...m,account_id:p})),{successLabel:`Created`})})},m={command:`traces`,describe:`Simulate request processing to debug rule matches, transforms, and routing decisions`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`request-tracers`,describe:`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
|