cf 0.11.0 → 0.12.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 +3 -3
- package/dist/_meta/commands.json +149 -5
- package/dist/_meta/hand-written-commands.json +181 -5
- package/dist/{abuse-reports-sDBTV0qZ.mjs → abuse-reports-D40QFl-y.mjs} +1 -1
- package/dist/{access-DcNzuCue.mjs → access-Dl2IU1ID.mjs} +1 -1
- package/dist/{account-BX90zXn5.mjs → account-CPbieCZ4.mjs} +1 -1
- package/dist/{account-tags-Bz3JG5hI.mjs → account-tags-skfP7H8k.mjs} +1 -1
- package/dist/{accounts-DCuW3xyZ.mjs → accounts-CSgR6909.mjs} +1 -1
- package/dist/{acm-zjfShZLS.mjs → acm-CVvCTaNk.mjs} +1 -1
- package/dist/{addressing-DORQ64Ux.mjs → addressing-Uq5hEDDP.mjs} +1 -1
- package/dist/{agent-context-BgPR_aQr.mjs → agent-context-BvuDdaJb.mjs} +1 -1
- package/dist/{agent-memory-C0hAUMeC.mjs → agent-memory-BrHMIU0E.mjs} +1 -1
- package/dist/{ai-audit-DnU3vn3E.mjs → ai-audit-BoZuL84i.mjs} +1 -1
- package/dist/{ai-gateway-COOrr_Yw.mjs → ai-gateway-DE50Jem1.mjs} +1 -1
- package/dist/{ai-search-DKbN9Tyd.mjs → ai-search-Fx7NHCHB.mjs} +1 -1
- package/dist/{ai-security-C_I5lo58.mjs → ai-security-DyLbY9kv.mjs} +1 -1
- package/dist/{ai-BpEBGMT2.mjs → ai-v2fP1r0s.mjs} +1 -1
- package/dist/{alerting-4T8gmZs-.mjs → alerting-5mFZjTcD.mjs} +1 -1
- package/dist/{analytics-Bxh4TCP7.mjs → analytics-BygTfozw.mjs} +1 -1
- package/dist/{analytics_engine-fV56bjVN.mjs → analytics_engine-4L-q362P.mjs} +1 -1
- package/dist/{api-security-COk_i184.mjs → api-security-DjFsRYWx.mjs} +1 -1
- package/dist/{argo-DIRfvxvv.mjs → argo-TzXPN7tz.mjs} +1 -1
- package/dist/args-CDgWUP4J.mjs +2 -0
- package/dist/{artifacts-BBfXNfUg.mjs → artifacts-dEw2UUBV.mjs} +1 -1
- package/dist/{audit-logs-BlOrlAWe.mjs → audit-logs-CqY7zzwv.mjs} +1 -1
- package/dist/{auth-DPhNN3Ly.mjs → auth-CPLdkOC7.mjs} +1 -1
- package/dist/{auth-D3X9HYhD.mjs → auth-DY_Y2bXC.mjs} +2 -2
- package/dist/{billing-B9e4PnvN.mjs → billing-DHQuRT8S.mjs} +1 -1
- package/dist/{bot-management-D2JVeS-V.mjs → bot-management-CfqG79hF.mjs} +1 -1
- package/dist/{botnet-feed-BTzTYs5d.mjs → botnet-feed-BOeNnDoH.mjs} +1 -1
- package/dist/{brand-protection-C5Q6Gpw9.mjs → brand-protection-DYttrKIM.mjs} +1 -1
- package/dist/{browser-extension-u5uA0Lwk.mjs → browser-extension-CTUCdgfn.mjs} +1 -1
- package/dist/{browser-run-CHGOCTdG.mjs → browser-run-373D4e1i.mjs} +1 -1
- package/dist/build-D0ir_S70.mjs +2 -0
- package/dist/{cache-C6V7PbQM.mjs → cache-DJXBmc3w.mjs} +1 -1
- package/dist/{calls-Bye8Tyy-.mjs → calls-COO0Eoz1.mjs} +1 -1
- package/dist/{certificate-authorities-B-U_e6JJ.mjs → certificate-authorities-DbHLmKbd.mjs} +1 -1
- package/dist/{cf-Ds4JFovl.mjs → cf-yPz_IqW6.mjs} +11 -11
- package/dist/{chunk-LQW53VED-22IYZovK.mjs → chunk-LQW53VED-9MACsvSG.mjs} +25 -25
- package/dist/{chunk-QBZBEHZB-CKzQKcIp.mjs → chunk-QBZBEHZB-yeyhVUeD.mjs} +1 -1
- package/dist/{client-certificates-3RrC-6LG.mjs → client-certificates-RBRqYP3f.mjs} +1 -1
- package/dist/{client-side-security-DIdKvRMT.mjs → client-side-security-HOmA37et.mjs} +1 -1
- package/dist/{cloud-connector-CL1jPQud.mjs → cloud-connector-C7hw1c1f.mjs} +1 -1
- package/dist/{cloudforce-one-DULeqLkR.mjs → cloudforce-one-DLOj76q4.mjs} +1 -1
- package/dist/command-BV87D4tR.mjs +2 -0
- package/dist/{completions-CqgGKRAC.mjs → completions-BnD46cXe.mjs} +1 -1
- package/dist/config.d.mts +305 -332
- package/dist/config.mjs +1 -1
- package/dist/{connector-interrupts-CXlLObDv.mjs → connector-interrupts-DY-z_LrH.mjs} +1 -1
- package/dist/{connector-telemetry-events-BrYX4ig4.mjs → connector-telemetry-events-DCXmcAc9.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-BdeBQYcM.mjs → connector-telemetry-snapshots-D8GNuzx3.mjs} +1 -1
- package/dist/{connectors-BQwyBJ4_.mjs → connectors-fEOn-J_i.mjs} +1 -1
- package/dist/containers-BDBsEs7-.mjs +58 -0
- package/dist/{content-scan-DNzhXYkY.mjs → content-scan-Cmj9--XY.mjs} +1 -1
- package/dist/{csamScanner-CFq5s1Q3.mjs → csamScanner-BRXyMCyH.mjs} +1 -1
- package/dist/{ct-alerting-CH6UmsGQ.mjs → ct-alerting-9AvYys-f.mjs} +1 -1
- package/dist/{custom-certificates-DnG73Wg2.mjs → custom-certificates-C5qrlyhb.mjs} +1 -1
- package/dist/{custom-csrs-bhClr2SU.mjs → custom-csrs-BgOnTbBW.mjs} +1 -1
- package/dist/{custom-hostnames-C0eiGvG9.mjs → custom-hostnames-CbQD9aYo.mjs} +1 -1
- package/dist/{custom-nameservers-CVMhhLm6.mjs → custom-nameservers-2ZajBkRC.mjs} +1 -1
- package/dist/{custom-pages-DTINMR30.mjs → custom-pages-Buki_Cb8.mjs} +1 -1
- package/dist/{d1-sKdExJYF.mjs → d1-n2in0cSF.mjs} +1 -1
- package/dist/{data-security-mV3a6UfW.mjs → data-security-DzOQMkv3.mjs} +1 -1
- package/dist/{dcv-delegation-dBu3jdRw.mjs → dcv-delegation-BTP9LCOm.mjs} +1 -1
- package/dist/deploy-BUSz35vq.mjs +2 -0
- package/dist/deploy-input-BvD9aRP1.mjs +2 -0
- package/dist/dev-DY_DquQx.mjs +4 -0
- package/dist/{diagnostics-CJV6qWUA.mjs → diagnostics-BvHV8kQb.mjs} +1 -1
- package/dist/{directory-B5zCMusW.mjs → directory-BeiSyg8A.mjs} +1 -1
- package/dist/{dispatch-namespaces-Dg5lu5xX.mjs → dispatch-namespaces-Dp8Jjpwy.mjs} +1 -1
- package/dist/dist-BBx1io2f.mjs +2 -0
- package/dist/dist-Cb9TJ2VV.mjs +9 -0
- package/dist/dist-DV7LR38l.mjs +387 -0
- package/dist/dist-DvizctjW.mjs +48 -0
- package/dist/{dls-t0hnIe_P.mjs → dls-BwoU29mS.mjs} +1 -1
- package/dist/{dns-C8FC2hbh.mjs → dns-DISAfuzj.mjs} +1 -1
- package/dist/{dns-firewall-CuhhUm55.mjs → dns-firewall-wBcCx_ua.mjs} +1 -1
- package/dist/dry-run-ILZRVpnp.mjs +2 -0
- package/dist/{durable-objects-BLrgM3Cw.mjs → durable-objects-DhDL3San.mjs} +1 -1
- package/dist/{email-auth-BmYrl0pO.mjs → email-auth-BROqK6-C.mjs} +1 -1
- package/dist/{email-routing-CF3_Z957.mjs → email-routing-BZXHDAOO.mjs} +1 -1
- package/dist/{email-security-F7OYcMkZ.mjs → email-security-DVumybrk.mjs} +1 -1
- package/dist/{email-sending-EyU3WvGQ.mjs → email-sending-CDQ3_wyz.mjs} +1 -1
- package/dist/{fieldExtractors-Cno37T2m.mjs → fieldExtractors-Cy1rxHEF.mjs} +1 -1
- package/dist/{firewall-8YWWy4iB.mjs → firewall-C0g5X7Zd.mjs} +1 -1
- package/dist/{flagship-C4x0l-8J.mjs → flagship-fFBiZUz-.mjs} +1 -1
- package/dist/{fraud-HR_SdUx3.mjs → fraud-CjIETOaM.mjs} +1 -1
- package/dist/{google-tag-gateway-BdcS0WnX.mjs → google-tag-gateway-hPa5IHUx.mjs} +1 -1
- package/dist/{healthchecks-4qOvjrTN.mjs → healthchecks-CoycpTf9.mjs} +1 -1
- package/dist/{hostnames-DehdYOMz.mjs → hostnames-x_Yezxpr.mjs} +1 -1
- package/dist/{hyperdrive-3gD3hn70.mjs → hyperdrive-BlfrTwSq.mjs} +1 -1
- package/dist/{iam-DR72hmii.mjs → iam-Bk7K_PPO.mjs} +1 -1
- package/dist/{images-CeKc5JPh.mjs → images-BAEFb9q1.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-DtFix9WL.mjs → intel-DDkyJVaP.mjs} +1 -1
- package/dist/interactive-CRnq-B5I.mjs +11 -0
- package/dist/{interactive-C7M55Wxx.mjs → interactive-cytQzL94.mjs} +1 -1
- package/dist/{ips-CtWCjXAN.mjs → ips-DU0ti0i0.mjs} +1 -1
- package/dist/{keyless-certificates-Dk24yQFz.mjs → keyless-certificates-E1P9jBTb.mjs} +1 -1
- package/dist/{keys-BmhG6Kn1.mjs → keys-DqldTZqH.mjs} +1 -1
- package/dist/{kv-BuVPAuZP.mjs → kv-CcfCfnwq.mjs} +1 -1
- package/dist/{leaked-credential-checks-XcZmt1I-.mjs → leaked-credential-checks-CqmKaEbd.mjs} +1 -1
- package/dist/{load-balancers-CylN-l7n.mjs → load-balancers-Dg4pDad1.mjs} +1 -1
- package/dist/{local-Be3lg_9E.mjs → local-DGiIS1uM.mjs} +1 -1
- package/dist/local-runtime--IQr44qq.mjs +2 -0
- package/dist/{logexplorer-CvRPoKbj.mjs → logexplorer-Bu2mG5rh.mjs} +1 -1
- package/dist/{logo-matches-Heuft3yF.mjs → logo-matches-CWUzxY7G.mjs} +1 -1
- package/dist/{logos-DRYjGBDq.mjs → logos-BTfdkDPi.mjs} +1 -1
- package/dist/{logpush-Dve9jOMp.mjs → logpush-BZyay3h2.mjs} +1 -1
- package/dist/{logs-SC86FE89.mjs → logs-BqF7jjQO.mjs} +1 -1
- package/dist/{magic-cloud-networking-DXzeqwX-.mjs → magic-cloud-networking-Dhd8pTyM.mjs} +1 -1
- package/dist/{magic-network-monitoring-DW0Jl74i.mjs → magic-network-monitoring-D0FnkjuN.mjs} +1 -1
- package/dist/{magic-transit-BK_3asH2.mjs → magic-transit-B5skt0G7.mjs} +1 -1
- package/dist/{managed-transforms-B6TV4qoE.mjs → managed-transforms-B6X_crcJ.mjs} +1 -1
- package/dist/{matches-Iss9Fo4R.mjs → matches-DeYaB4I0.mjs} +1 -1
- package/dist/{mcp-8wxXT6JU.mjs → mcp-ChjBiMx2.mjs} +1 -1
- package/dist/{mesh-Bf9UAS4J.mjs → mesh-DRVAFLBX.mjs} +1 -1
- package/dist/{moq-ZKMFOeVz.mjs → moq-DE7VDEFS.mjs} +1 -1
- package/dist/{mtls-certificates-DoWm6GiE.mjs → mtls-certificates-Cbc3uAkN.mjs} +1 -1
- package/dist/{network-B1lBARU9.mjs → network-CDPZNFbn.mjs} +1 -1
- package/dist/{network-interconnects-CLYIFHfU.mjs → network-interconnects-CMRs_chR.mjs} +1 -1
- package/dist/{oauth-DuEONNgC.mjs → oauth-DAa7SwkM.mjs} +4 -4
- package/dist/{oauth-clients-DgiTzLzu.mjs → oauth-clients-DAI_gcuL.mjs} +1 -1
- package/dist/{oauth-scopes-BOBRMxjm.mjs → oauth-scopes-BE6xF4_h.mjs} +1 -1
- package/dist/{observability-Jya7-zkl.mjs → observability-DnyI8rPJ.mjs} +1 -1
- package/dist/{organization-CYxYV4e0.mjs → organization-yh0mSUdI.mjs} +1 -1
- package/dist/{organizations-SacGUW44.mjs → organizations-B3aU-RCG.mjs} +1 -1
- package/dist/{origin-ca-certificates-Ph1bJGQ1.mjs → origin-ca-certificates-BaNWfVqf.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BBLiGAGB.mjs → origin-post-quantum-encryption-CIUtQgyv.mjs} +1 -1
- package/dist/{origin-tls-client-auth-DSDgTN2X.mjs → origin-tls-client-auth-CvEpbX2Q.mjs} +1 -1
- package/dist/{page-rules-BqEyFR2c.mjs → page-rules-CzbyXbt6.mjs} +1 -1
- package/dist/{pages-CQ7ZVWk1.mjs → pages-CX8yefTI.mjs} +1 -1
- package/dist/{pay-per-crawl-BMe_3_Qj.mjs → pay-per-crawl-v4vBOMWD.mjs} +1 -1
- package/dist/{pipelines-6De2Pe2C.mjs → pipelines-BZ1KGupx.mjs} +1 -1
- package/dist/{precursor-iwK-1P_d.mjs → precursor-D42A9ay5.mjs} +1 -1
- package/dist/{progress-BqQcF5QH.mjs → progress-jYW64HY7.mjs} +1 -1
- package/dist/{project-settings-C_1-JI6Y.mjs → project-settings-BN7tL0c7.mjs} +2 -2
- package/dist/{prompt-B0sWIs9c.mjs → prompt-CyATfGUu.mjs} +1 -1
- package/dist/{public-BYCVISMH-DnMJ5Jct.mjs → public-BMg6-Hxh-DgIH5obr.mjs} +1 -1
- package/dist/{queries-c7zvnfEQ.mjs → queries-xvETUjUE.mjs} +1 -1
- package/dist/{queues-BU6y16qS.mjs → queues-CpqHDtxF.mjs} +1 -1
- package/dist/{r2-data-catalog-B-tw-JdG.mjs → r2-data-catalog-DgKmlTKR.mjs} +1 -1
- package/dist/{r2-Jo3QMahK.mjs → r2-jhmLvD1z.mjs} +1 -1
- package/dist/{radar-DIYAMEof.mjs → radar-C2J16wpX.mjs} +1 -1
- package/dist/{rate-limits-DewOcznT.mjs → rate-limits-CoH9Xma0.mjs} +1 -1
- package/dist/{raw-fetch-Cc-MjHeL.mjs → raw-fetch-CNKIypJ7.mjs} +1 -1
- package/dist/{realtimekit-cnZEVNDn.mjs → realtimekit-CDs0Z5WW.mjs} +1 -1
- package/dist/{registrar-BsWr_aPM.mjs → registrar-BI5ewTAk.mjs} +1 -1
- package/dist/{registrar-sandbox-BlcpUyIH.mjs → registrar-sandbox-al1znWMc.mjs} +1 -1
- package/dist/{registry-jifR3_Y6.mjs → registry-5-I2XLwF.mjs} +1 -1
- package/dist/{reporting--1AyTV7k.mjs → reporting-CxsdHAH3.mjs} +1 -1
- package/dist/{request-tracers-C_VX7X6-.mjs → request-tracers-DJJCncft.mjs} +1 -1
- package/dist/{resource-sharing-Br5dqr3o.mjs → resource-sharing-qQGn8AEn.mjs} +1 -1
- package/dist/{resource-tagging-C33U6T74.mjs → resource-tagging-aTtpX5e5.mjs} +1 -1
- package/dist/{rules-BfjzALMi.mjs → rules-PpsDU89Q.mjs} +1 -1
- package/dist/{rulesets-3i_1Vwt-.mjs → rulesets-DP12Aqik.mjs} +1 -1
- package/dist/{rum-CjmIckiR.mjs → rum-DxvpzJYc.mjs} +1 -1
- package/dist/{schema-1mwmslUV.mjs → schema-DlLbiOJj.mjs} +1 -1
- package/dist/{schema-flags-llLJuFFw.mjs → schema-flags-CTfQVGCs.mjs} +1 -1
- package/dist/schemas-BFCBlp_W.mjs +65 -0
- package/dist/{scim-pApmzA5B.mjs → scim-DJ4AVU20.mjs} +1 -1
- package/dist/{secrets-store-DBC9WJau.mjs → secrets-store-D6KDNo_s.mjs} +1 -1
- package/dist/{security-center-Djm06dq-.mjs → security-center-008FMs_z.mjs} +1 -1
- package/dist/{security-txt-Ci7bP4zH.mjs → security-txt-CqcfrhlN.mjs} +1 -1
- package/dist/{share-Dj-MNXrw.mjs → share-D5fzsVAJ.mjs} +1 -1
- package/dist/{shared-BJvq4DkR.mjs → shared-DlKGNPiT.mjs} +92 -142
- package/dist/{smart-shield--8EpJjrF.mjs → smart-shield-DpFscIk8.mjs} +1 -1
- package/dist/{snippets-Dyz0PH60.mjs → snippets-CCKgI2ZX.mjs} +1 -1
- package/dist/spawn-C3_tJ3RB.mjs +526 -0
- package/dist/{spectrum-rAHWz8rH.mjs → spectrum-LmdqY3ki.mjs} +1 -1
- package/dist/{speed-BKepWBXj.mjs → speed-CEK36h3A.mjs} +1 -1
- package/dist/src-CEb2fgtT.mjs +108 -0
- package/dist/{ssl-KdFiY3ev.mjs → ssl-ChHUyaQm.mjs} +1 -1
- package/dist/{startup-profile-GLNPHQ9U.mjs → startup-profile-Dpxg-MjV.mjs} +3 -3
- package/dist/{state-Cu3cItUg.mjs → state-DeX23Kmg.mjs} +1 -1
- package/dist/{stream-CKJ6Tb0M.mjs → stream-DfUSELMX.mjs} +1 -1
- package/dist/{submit-BxbKKhBn.mjs → submit-DF2G5CIz.mjs} +1 -1
- package/dist/{tags-DA8dq9fx.mjs → tags-nFJJHlLJ.mjs} +1 -1
- package/dist/{tenant-DLXw48hS.mjs → tenant-CRLw1oRU.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-9G93XuvU.mjs → tenant-custom-nameservers-BvBQRDcs.mjs} +1 -1
- package/dist/{tools-x8bj9E6b.mjs → tools-j8UGEtP1.mjs} +1 -1
- package/dist/{tunnel-CNQA5Flp.mjs → tunnel-CMQeBgmb.mjs} +1 -1
- package/dist/{tunnels-CC10EOsU.mjs → tunnels-iVA3MrdS.mjs} +1 -1
- package/dist/{turnstile-CH58hnf4.mjs → turnstile-DQHP6-_b.mjs} +1 -1
- package/dist/{ui-CmnnBm_O.mjs → ui-DJFcf61J.mjs} +1 -1
- package/dist/{url-info-BpCgdUtL.mjs → url-info-BVgdb_pf.mjs} +1 -1
- package/dist/{url-normalization-BzuynEy1.mjs → url-normalization-BTcxLxIQ.mjs} +1 -1
- package/dist/{url-scanner-APIZbhB7.mjs → url-scanner-DwuDZLPk.mjs} +1 -1
- package/dist/{user-2-NGebfI.mjs → user-I_MbB_KX.mjs} +1 -1
- package/dist/{values-S_bNv819.mjs → values-S-Q7-5o8.mjs} +1 -1
- package/dist/{vectorize-Bv7feLBC.mjs → vectorize-CNZdF_0A.mjs} +1 -1
- package/dist/{waiting-rooms-Dk4LIpvm.mjs → waiting-rooms-Bo-OSsxu.mjs} +1 -1
- package/dist/{web-assets-C1UmOyzD.mjs → web-assets-tlFzKdNL.mjs} +1 -1
- package/dist/{web3-GnUocVYH.mjs → web3-CdbfoZ2x.mjs} +1 -1
- package/dist/{workers-J1-PLwdl.mjs → workers-DQ9Q7czn.mjs} +2 -2
- package/dist/{workers-builds-DCHmWOMS.mjs → workers-builds-CGRhYx-x.mjs} +1 -1
- package/dist/{workflows-CArfEI2c.mjs → workflows-BhEy-crm.mjs} +1 -1
- package/dist/{zaraz-mg2YlR3_.mjs → zaraz-DbKvA_8C.mjs} +1 -1
- package/dist/{zero-trust-DVdUPtj1.mjs → zero-trust-DrHCPVOc.mjs} +1 -1
- package/dist/{zone-DMAfrDJX.mjs → zone-D2zrbJI2.mjs} +1 -1
- package/dist/{zones-CNwxUi7I.mjs → zones-DrpxQ_-A.mjs} +1 -1
- package/package.json +9 -8
- package/dist/args-DlUhyGU0.mjs +0 -2
- package/dist/build-D0FhOj40.mjs +0 -8
- package/dist/command-C9VP3xaA.mjs +0 -2
- package/dist/containers-BrQtGiNp.mjs +0 -58
- package/dist/deploy-BL59O1O1.mjs +0 -2
- package/dist/deploy-input-Dz6q-__n.mjs +0 -2
- package/dist/dev-BDaavgH1.mjs +0 -4
- package/dist/dist-BHi7UhXO.mjs +0 -72
- package/dist/dist-BWpErtDM.mjs +0 -384
- package/dist/dry-run-DL2V6yFm.mjs +0 -2
- package/dist/local-runtime-Ce7k598H.mjs +0 -2
- package/dist/spawn-C5Z7oWdp.mjs +0 -519
- package/dist/src-gJma71Ec.mjs +0 -108
- /package/dist/{alerts-15-IW4jE.mjs → alerts-9PR5sQ_z.mjs} +0 -0
- /package/dist/{autorag-CFwRkEKw.mjs → autorag-Bevo1kIH.mjs} +0 -0
- /package/dist/{body-parser-BshbixEq.mjs → body-parser-BGVbwPeM.mjs} +0 -0
- /package/dist/{brands-BgT1vu9B.mjs → brands-C4M04Man.mjs} +0 -0
- /package/dist/{clear-BlCK85Me.mjs → clear-DS0eRXOc.mjs} +0 -0
- /package/dist/{cli-types-DAYeL_Mj.mjs → cli-types-C3nVfpSG.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BbpcII3_.mjs → connector-telemetry-events-latest-CKKG6_pD.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-DuCiimXl.mjs → connector-telemetry-snapshots-latest-Bv5OddJr.mjs} +0 -0
- /package/dist/{domain-info-C7LBxPBt.mjs → domain-info-BUiaGCEq.mjs} +0 -0
- /package/dist/{health-DZFfafkX.mjs → health-vX6Ml2Na.mjs} +0 -0
- /package/dist/{input-validation-QDIYu7Vb.mjs → input-validation-1esLElok.mjs} +0 -0
- /package/dist/{internal-BKHC2D1Y.mjs → internal-ROz7anul.mjs} +0 -0
- /package/dist/{live-DwCvDmaH.mjs → live-CSxvigCS.mjs} +0 -0
- /package/dist/{metadata-B5yfL0ln.mjs → metadata-DEqBUaSv.mjs} +0 -0
- /package/dist/{open-PBXRGS4R-CX8K4WYl.mjs → open-PBXRGS4R-DIiYQyU9.mjs} +0 -0
- /package/dist/{output-Ccqw2WOb.mjs → output-BqDR9h74.mjs} +0 -0
- /package/dist/{rate-limit-analytics-B8Vuu1sU.mjs → rate-limit-analytics-CgHgKjmV.mjs} +0 -0
- /package/dist/{ready-D9H2zHHI.mjs → ready-6G9zVGPJ.mjs} +0 -0
- /package/dist/{recent-submissions-BPo0J80d.mjs → recent-submissions-B3Smh-QM.mjs} +0 -0
- /package/dist/{refute-2W8NLCN4.mjs → refute-DjkmLSNe.mjs} +0 -0
- /package/dist/{resolve-B8CyM1mi.mjs → resolve-DEvdeprv.mjs} +0 -0
- /package/dist/{scan-logo-D5x6F1Y0.mjs → scan-logo-545qLcGs.mjs} +0 -0
- /package/dist/{scan-page-CWhta3x7.mjs → scan-page-DRQiVufl.mjs} +0 -0
- /package/dist/{search-DZmBQJL9.mjs → search-CXbqFoqe.mjs} +0 -0
- /package/dist/{signed-url-CQrmWgz5.mjs → signed-url-rU_nvgFA.mjs} +0 -0
- /package/dist/{submission-info-C98A0bqq.mjs → submission-info-D6PgXNQP.mjs} +0 -0
- /package/dist/{total-queries-BZoaFoDE.mjs → total-queries-XkFyu8H5.mjs} +0 -0
- /package/dist/{tracked-domains-CNHogPHx.mjs → tracked-domains-CmcRXHj_.mjs} +0 -0
- /package/dist/{verify-4e4L9IRk.mjs → verify-CM1NakP0.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-DAa7SwkM.mjs";import{r as t}from"./auth-DY_Y2bXC.mjs";import{t as n}from"./output-BqDR9h74.mjs";import{t as r}from"./dry-run-ILZRVpnp.mjs";import{t as i}from"./progress-jYW64HY7.mjs";import{n as a,t as o}from"./body-parser-BGVbwPeM.mjs";import{n as s}from"./input-validation-1esLElok.mjs";import{n as c}from"./prompt-CyATfGUu.mjs";function l(e){return e.option(`match-request-methods`,{type:`string`,array:!0,description:"The HTTP methods to match. You can specify a subset (for example, `['POST','PUT']`) or all methods (`['_ALL_']`). This field is optional when creating a rate limit."}).option(`match-request-schemes`,{type:`string`,array:!0,description:"The HTTP schemes to match. You can specify one scheme (`['HTTPS']`), both schemes (`['HTTP','HTTPS']`), or all schemes (`['_ALL_']`). This field is optional."}).option(`match-request-url`,{type:`string`,description:"The URL pattern to match, composed of a host and a path such as `example.org/path*`. Normalization is applied before the pattern is matched. `*` wildcards are expanded to match applicable traffic. Query strings are not matched. Set the value to `*` to match all traffic to your zone."}).option(`match-response-origin-traffic`,{type:`boolean`,description:`When true, only the uncached traffic served from your origin servers will count towards rate limiting. In this case, any cached traffic served by Cloudflare will not count towards rate limiting. This field is optional.
|
|
3
3
|
Notes: This field is deprecated. Instead, use response headers and set "origin_traffic" to "false" to avoid legacy behaviour interacting with the "response_headers" property.`}).option(`period`,{type:`number`,description:`The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.`}).option(`threshold`,{type:`number`,description:"The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period."}).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 u={command:`create`,describe:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:l,handler:async c=>{if(c.dryRun){r({command:`cf rate-limits create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/rate_limits`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Creating`,async()=>l.rateLimits.create({...e,zone_id:u})),{successLabel:`Created`});return}if(c.period===void 0)throw Error(`--period is required (or pass --body with this field set).`);if(c.threshold===void 0)throw Error(`--threshold is required (or pass --body with this field set).`);let d=o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold});n(await i(`Creating`,async()=>l.rateLimits.create({...d,zone_id:u})),{successLabel:`Created`})}};function d(e){return e.positional(`rate-limit-id`,{type:`string`,description:`Defines the unique identifier of the rate limit.`,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 f={command:`delete <rate-limit-id>`,describe:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:d,handler:async a=>{if(a.dryRun){r({command:`cf rate-limits delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/rate_limits/${a[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(a[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(a[`rate-limit-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await c({force:!!a.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}n(await i(`Deleting`,async()=>o.rateLimits.delete({zone_id:s,rate_limit_id:a[`rate-limit-id`]})),{successLabel:`Deleted`})}};function p(e){return e.positional(`rate-limit-id`,{type:`string`,description:`Defines the unique identifier of the rate limit.`,demandOption:!0}).option(`match-request-methods`,{type:`string`,array:!0,description:"The HTTP methods to match. You can specify a subset (for example, `['POST','PUT']`) or all methods (`['_ALL_']`). This field is optional when creating a rate limit."}).option(`match-request-schemes`,{type:`string`,array:!0,description:"The HTTP schemes to match. You can specify one scheme (`['HTTPS']`), both schemes (`['HTTP','HTTPS']`), or all schemes (`['_ALL_']`). This field is optional."}).option(`match-request-url`,{type:`string`,description:"The URL pattern to match, composed of a host and a path such as `example.org/path*`. Normalization is applied before the pattern is matched. `*` wildcards are expanded to match applicable traffic. Query strings are not matched. Set the value to `*` to match all traffic to your zone."}).option(`match-response-origin-traffic`,{type:`boolean`,description:`When true, only the uncached traffic served from your origin servers will count towards rate limiting. In this case, any cached traffic served by Cloudflare will not count towards rate limiting. This field is optional.
|
|
5
5
|
Notes: This field is deprecated. Instead, use response headers and set "origin_traffic" to "false" to avoid legacy behaviour interacting with the "response_headers" property.`}).option(`period`,{type:`number`,description:`The time in seconds (an integer value) to count matching traffic. If the count exceeds the configured threshold within this period, Cloudflare will perform the configured action.`}).option(`threshold`,{type:`number`,description:"The threshold that will trigger the configured mitigation action. Configure this value along with the `period` property to establish a threshold per period."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`edit <rate-limit-id>`,describe:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:p,handler:async c=>{if(c.dryRun){r({command:`cf rate-limits edit`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/rate_limits/${c[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(c[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(c[`rate-limit-id`]??``),"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.rateLimits.edit({...e,zone_id:u,rate_limit_id:c[`rate-limit-id`]})),{successLabel:`Updated`});return}if(c.period===void 0)throw Error(`--period is required (or pass --body with this field set).`);if(c.threshold===void 0)throw Error(`--threshold is required (or pass --body with this field set).`);let d=o({match:{request:{methods:c[`match-request-methods`],schemes:c[`match-request-schemes`],url:s(c[`match-request-url`],`match-request-url`,`text`)},response:{origin_traffic:c[`match-response-origin-traffic`]}},period:c.period,threshold:c.threshold});n(await i(`Updating`,async()=>l.rateLimits.edit({...d,zone_id:u,rate_limit_id:c[`rate-limit-id`]})),{successLabel:`Updated`})}};function h(e){return e.positional(`rate-limit-id`,{type:`string`,description:`Defines the unique identifier of the rate limit.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <rate-limit-id>`,describe:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:h,handler:async a=>{if(a.dryRun){r({command:`cf rate-limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/rate_limits/${a[`rate-limit-id`]==null?`<rate-limit-id>`:encodeURIComponent(String(a[`rate-limit-id`]))}`,pathParams:{"rate-limit-id":String(a[`rate-limit-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.rateLimits.get({zone_id:s,rate_limit_id:a[`rate-limit-id`]})),{successLabel:`Loaded`})}};function _(e){return e.option(`page`,{type:`number`,description:`Defines the page number of paginated results.`}).option(`per-page`,{type:`number`,description:"Defines the maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`**Deprecated**: This endpoint returns 410 Gone. Please use the Rulesets API instead.`,builder:_,handler:async a=>{let o={page:a.page,per_page:a[`per-page`]};if(a.dryRun){r({command:`cf rate-limits list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/rate_limits`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.rateLimits.list({zone_id:c,...o})),{successLabel:`Loaded`})}},y={command:`rate-limits`,describe:`Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations`,builder:e=>e.command(u).command(f).command(m).command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./sdk-ZctLa5jW.mjs";import{
|
|
2
|
+
import{r as e}from"./sdk-ZctLa5jW.mjs";import{H as t}from"./dist-DV7LR38l.mjs";import{r as n}from"./local-DGiIS1uM.mjs";import{p as r}from"./oauth-DAa7SwkM.mjs";import{i,s as a,t as o}from"./auth-DY_Y2bXC.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={...a()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await i()}`;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-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,t as c}from"./body-parser-BshbixEq.mjs";import{n as l}from"./input-validation-QDIYu7Vb.mjs";import{a as u,i as d,n as f}from"./prompt-B0sWIs9c.mjs";import{t as p}from"./cli-types-DAYeL_Mj.mjs";function m(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 h={command:`get <app-id>`,describe:`Returns day-wise livestream analytics for the specified time range.`,builder:m,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.daily.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},ee={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(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 g={command:`get <app-id>`,describe:`Returns livestream analytics for the specified time range.`,builder:te,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/overall`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},_={command:`livestreams`,describe:`Livestream analytics for RealtimeKit applications`,builder:e=>e.command(g).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(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 y={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:v,handler:async s=>{let c={start_date:s[`start-date`],end_date:s[`end-date`]};if(s.dryRun){a({command:`cf realtimekit analytics usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.usage.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},b={command:`usage`,describe:`Usage analytics for RealtimeKit applications`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`analytics`,describe:`Usage and livestream analytics for RealtimeKit applications`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(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 C={command:`create`,describe:`Create new app for your account`,builder:S,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({name:l(d.name,`name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.apps.create({...e,account_id:p})),{successLabel:`Created`});return}d.name===void 0&&(d.name=await u(`name`,`The name field`));let m=c({name:l(d.name,`name`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.apps.create({...m,account_id:p})),{successLabel:`Created`})}};function w(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 T={command:`get <app-id>`,describe:`Fetch details for an app in your account.`,builder:w,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.apps.get({account_id:l,app_id:s[`app-id`]})),{successLabel:`Loaded`})}};function E(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 D={command:`list`,describe:`Fetch all apps for your account`,builder:p(E),handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`],search:s.search,sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.apps.list({account_id:u,...c})),{successLabel:`Loaded`})}},O={command:`apps`,describe:`RealtimeKit applications that group meetings, sessions, and configuration`,builder:e=>e.command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(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 A={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:k,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.get({account_id:u,app_id:s[`app-id`],livestream_id:s[`livestream-id`],...c})),{successLabel:`Loaded`})}};function j(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 M={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:p(j),handler:async s=>{let c={exclude_meetings:s[`exclude-meetings`],per_page:s[`per-page`],page_no:s[`page-no`],status:s.status,start_time:s[`start-time`],end_time:s[`end-time`],sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit livestreams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.list({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}};function N(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 P={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:N,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/sessions/${s[`livestream-session-id`]==null?`<livestream-session-id>`:encodeURIComponent(String(s[`livestream-session-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-session-id":String(s[`livestream-session-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.get({account_id:l,app_id:s[`app-id`],"livestream-session-id":s[`livestream-session-id`]})),{successLabel:`Loaded`})}};function F(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 I={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:F,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}/active-livestream-session`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.listActive({account_id:l,app_id:s[`app-id`],livestream_id:s[`livestream-id`]})),{successLabel:`Loaded`})}},L={command:`sessions`,describe:`Sessions for RealtimeKit livestreams`,builder:e=>e.command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(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 z={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:R,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit livestreams start`,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`]))}/livestreams`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`});return}let p=c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}});i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`})}};function B(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 V={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:B,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams stop`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-livestream/stop`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation stops the active livestream. Viewers lose the broadcast immediately.`})){process.stderr.write(`Aborted.
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u,i as d,n as f}from"./prompt-CyATfGUu.mjs";import{t as p}from"./cli-types-C3nVfpSG.mjs";function m(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 h={command:`get <app-id>`,describe:`Returns day-wise livestream analytics for the specified time range.`,builder:m,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.daily.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},ee={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(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 g={command:`get <app-id>`,describe:`Returns livestream analytics for the specified time range.`,builder:te,handler:async s=>{let c={start_time:s[`start-time`],end_time:s[`end-time`],filters:s.filters};if(s.dryRun){a({command:`cf realtimekit analytics livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/livestreams/overall`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.livestreams.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},_={command:`livestreams`,describe:`Livestream analytics for RealtimeKit applications`,builder:e=>e.command(g).command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(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 y={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:v,handler:async s=>{let c={start_date:s[`start-date`],end_date:s[`end-date`]};if(s.dryRun){a({command:`cf realtimekit analytics usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/analytics/daywise`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.analytics.usage.get({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}},b={command:`usage`,describe:`Usage analytics for RealtimeKit applications`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},x={command:`analytics`,describe:`Usage and livestream analytics for RealtimeKit applications`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(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 C={command:`create`,describe:`Create new app for your account`,builder:S,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({name:l(d.name,`name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.apps.create({...e,account_id:p})),{successLabel:`Created`});return}d.name===void 0&&(d.name=await u(`name`,`The name field`));let m=c({name:l(d.name,`name`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.apps.create({...m,account_id:p})),{successLabel:`Created`})}};function w(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 T={command:`get <app-id>`,describe:`Fetch details for an app in your account.`,builder:w,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.apps.get({account_id:l,app_id:s[`app-id`]})),{successLabel:`Loaded`})}};function E(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 D={command:`list`,describe:`Fetch all apps for your account`,builder:p(E),handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`],search:s.search,sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/apps`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.apps.list({account_id:u,...c})),{successLabel:`Loaded`})}},O={command:`apps`,describe:`RealtimeKit applications that group meetings, sessions, and configuration`,builder:e=>e.command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(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 A={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:k,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit livestreams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.get({account_id:u,app_id:s[`app-id`],livestream_id:s[`livestream-id`],...c})),{successLabel:`Loaded`})}};function j(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 M={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:p(j),handler:async s=>{let c={exclude_meetings:s[`exclude-meetings`],per_page:s[`per-page`],page_no:s[`page-no`],status:s.status,start_time:s[`start-time`],end_time:s[`end-time`],sort_order:s[`sort-order`]};if(s.dryRun){a({command:`cf realtimekit livestreams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.livestreams.list({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}};function N(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 P={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:N,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/sessions/${s[`livestream-session-id`]==null?`<livestream-session-id>`:encodeURIComponent(String(s[`livestream-session-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-session-id":String(s[`livestream-session-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.get({account_id:l,app_id:s[`app-id`],"livestream-session-id":s[`livestream-session-id`]})),{successLabel:`Loaded`})}};function F(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 I={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:F,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams sessions list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/livestreams/${s[`livestream-id`]==null?`<livestream-id>`:encodeURIComponent(String(s[`livestream-id`]))}/active-livestream-session`,pathParams:{"app-id":String(s[`app-id`]??``),"livestream-id":String(s[`livestream-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.livestreams.sessions.listActive({account_id:l,app_id:s[`app-id`],livestream_id:s[`livestream-id`]})),{successLabel:`Loaded`})}},L={command:`sessions`,describe:`Sessions for RealtimeKit livestreams`,builder:e=>e.command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(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 z={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:R,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit livestreams start`,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`]))}/livestreams`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`});return}let p=c({name:l(u.name,`name`,`text`),video_config:{height:u[`video-config-height`],width:u[`video-config-width`]}});i(await o(`Creating`,async()=>d.realtimekit.livestreams.start({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Created`})}};function B(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 V={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:B,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit livestreams stop`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-livestream/stop`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.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()=>c.realtimekit.livestreams.stop({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Deleted`})}},H={command:`livestreams`,describe:`Independent and meeting-based livestreams and their sessions`,builder:e=>e.command(A).command(M).command(z).command(V).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(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 W={command:`get <meeting-id>`,describe:`Returns details of an ongoing active session for the given meeting ID.`,builder:U,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings active get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-session`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.meetings.active.get({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Loaded`})}};function G(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 K={command:`kick-all <meeting-id>`,describe:`Kicks all participants from an active session for the given meeting ID.`,builder:G,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings active kick-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-session/kick-all`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation disconnects every active participant immediately.`})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}i(await o(`Deleting`,async()=>c.realtimekit.meetings.active.kickAll({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Deleted`})}};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 kicking participants from an active session. At least one of `participant_ids` or `custom_participant_ids` must contain a value."})}const J={command:`kick <meeting-id>`,describe:`Kicks one or more participants from an active session using user ID or custom participant ID.`,builder:q,handler:async l=>{if(l.dryRun){a({command:`cf realtimekit meetings active kick`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/meetings/${l[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(l[`meeting-id`]))}/active-session/kick`,pathParams:{"app-id":String(l[`app-id`]??``),"meeting-id":String(l[`meeting-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.realtimekit.meetings.active.kick({...e,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`});return}let f=c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]});i(await o(`Creating`,async()=>u.realtimekit.meetings.active.kick({...f,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`})}};function Y(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 X={command:`mute-all <meeting-id>`,describe:`Mutes all participants of an active session for the given meeting ID.`,builder:Y,handler:async l=>{if(l.dryRun){a({command:`cf realtimekit meetings active mute-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/meetings/${l[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(l[`meeting-id`]))}/active-session/mute-all`,pathParams:{"app-id":String(l[`app-id`]??``),"meeting-id":String(l[`meeting-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({allow_unmute:l[`allow-unmute`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.realtimekit.meetings.active.muteAll({...e,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`});return}let f=c({allow_unmute:l[`allow-unmute`]});i(await o(`Creating`,async()=>u.realtimekit.meetings.active.muteAll({...f,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`})}};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(`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 Q={command:`mute <meeting-id>`,describe:`Mutes one or more participants from an active session using user ID or custom participant ID.`,builder:Z,handler:async l=>{if(l.dryRun){a({command:`cf realtimekit meetings active mute`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/meetings/${l[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(l[`meeting-id`]))}/active-session/mute`,pathParams:{"app-id":String(l[`app-id`]??``),"meeting-id":String(l[`meeting-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.realtimekit.meetings.active.mute({...e,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`});return}let f=c({custom_participant_ids:l[`custom-participant-ids`],participant_ids:l[`participant-ids`]});i(await o(`Creating`,async()=>u.realtimekit.meetings.active.mute({...f,account_id:d,app_id:l[`app-id`],meeting_id:l[`meeting-id`]})),{successLabel:`Created`})}};function ne(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 re={command:`create <meeting-id>`,describe:`Creates a new poll in an active session for the given meeting ID.`,builder:ne,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit meetings active polls 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/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/active-session/poll`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({anonymous:d.anonymous,hide_votes:d[`hide-votes`],options:d.options,question:l(d.question,`question`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.meetings.active.polls.create({...e,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`});return}if(d.options===void 0)throw Error(`--options is required (or pass --body with this field set).`);d.question===void 0&&(d.question=await u(`question`,`Question of the poll`));let m=c({anonymous:d.anonymous,hide_votes:d[`hide-votes`],options:d.options,question:l(d.question,`question`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.meetings.active.polls.create({...m,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`})}},ie={command:`polls`,describe:`Polls for active meeting sessions`,builder:e=>e.command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`active`,describe:`Live meeting state and participant controls`,builder:e=>e.command(W).command(J).command(K).command(Q).command(X).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(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 se={command:`create <app-id>`,describe:`Create a meeting for the given App ID.`,builder:oe,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings create`,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`,pathParams:{"app-id":String(u[`app-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Creating`,async()=>d.realtimekit.meetings.create({...e,account_id:f,app_id:u[`app-id`]})),{successLabel:`Created`});return}let p=c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]});i(await o(`Creating`,async()=>d.realtimekit.meetings.create({...p,account_id:f,app_id:u[`app-id`]})),{successLabel:`Created`})}};function ce(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 le={command:`get <meeting-id>`,describe:`Returns a meeting details in an App for the given meeting ID.`,builder:ce,handler:async s=>{let c={name:s.name};if(s.dryRun){a({command:`cf realtimekit meetings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.get({account_id:u,app_id:s[`app-id`],meeting_id:s[`meeting-id`],...c})),{successLabel:`Loaded`})}};function ue(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 de={command:`list`,describe:`Returns all meetings for the given App ID.`,builder:p(ue),handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`],start_time:s[`start-time`],end_time:s[`end-time`],search:s.search,status:s.status};if(s.dryRun){a({command:`cf realtimekit meetings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings`,pathParams:{"app-id":String(s[`app-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.list({account_id:u,app_id:s[`app-id`],...c})),{successLabel:`Loaded`})}};function fe(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 pe={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:fe,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit meetings livestream get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/livestream`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.livestream.get({account_id:u,app_id:s[`app-id`],meeting_id:s[`meeting-id`],...c})),{successLabel:`Loaded`})}};function me(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 he={command:`list-active <meeting-id>`,describe:`Returns details of all active livestreams for the given meeting ID.`,builder:me,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings livestream list-active`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/active-livestream`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.meetings.livestream.listActive({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`]})),{successLabel:`Loaded`})}},ge={command:`livestream`,describe:`Livestream operations associated with RealtimeKit meetings`,builder:e=>e.command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(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 ve={command:`create <meeting-id>`,describe:`Adds a participant to the given meeting ID.`,builder:_e,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit meetings participants 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/${d[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(d[`meeting-id`]))}/participants`,pathParams:{"app-id":String(d[`app-id`]??``),"meeting-id":String(d[`meeting-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.realtimekit.meetings.participants.create({...e,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`});return}d[`custom-participant-id`]===void 0&&(d[`custom-participant-id`]=await u(`custom-participant-id`,`A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. `)),d[`preset-name`]===void 0&&(d[`preset-name`]=await u(`preset-name`,`Name of the preset to apply to this participant.`));let m=c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)});i(await o(`Creating`,async()=>f.realtimekit.meetings.participants.create({...m,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`]})),{successLabel:`Created`})}};function ye(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 be={command:`delete <participant-id>`,describe:`Deletes a participant for the given meeting and participant ID.`,builder:ye,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings participants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants/${s[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(s[`participant-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``),"participant-id":String(s[`participant-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.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()=>c.realtimekit.meetings.participants.delete({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`],participant_id:s[`participant-id`]})),{successLabel:`Deleted`})}};function xe(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 Se={command:`get <participant-id>`,describe:`Returns a participant details for the given meeting and participant ID.`,builder:xe,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings participants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants/${s[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(s[`participant-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``),"participant-id":String(s[`participant-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.realtimekit.meetings.participants.get({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`],participant_id:s[`participant-id`]})),{successLabel:`Loaded`})}};function Ce(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 we={command:`list`,describe:`Returns all participants detail for the given meeting ID.`,builder:Ce,handler:async s=>{let c={page_no:s[`page-no`],per_page:s[`per-page`]};if(s.dryRun){a({command:`cf realtimekit meetings participants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.realtimekit.meetings.participants.list({account_id:u,app_id:s[`app-id`],meeting_id:s[`meeting-id`],...c})),{successLabel:`Loaded`})}};function Te(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 Ee={command:`replace <participant-id>`,describe:`Replaces a participant's details for the given meeting and participant ID.`,builder:Te,handler:async d=>{if(d.dryRun){a({command:`cf realtimekit meetings participants 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`]))}/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?c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.realtimekit.meetings.participants.replace({...e,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`],participant_id:d[`participant-id`]})),{successLabel:`Updated`});return}d[`custom-participant-id`]===void 0&&(d[`custom-participant-id`]=await u(`custom-participant-id`,`Unique participant ID accepted by the replace participant API.`)),d[`preset-name`]===void 0&&(d[`preset-name`]=await u(`preset-name`,`Name of the preset to apply to this participant.`));let m=c({custom_participant_id:l(d[`custom-participant-id`],`custom-participant-id`,`text`),name:l(d.name,`name`,`text`),picture:l(d.picture,`picture`,`text`),preset_name:l(d[`preset-name`],`preset-name`,`text`)});i(await o(`Updating`,async()=>f.realtimekit.meetings.participants.replace({...m,account_id:p,app_id:d[`app-id`],meeting_id:d[`meeting-id`],participant_id:d[`participant-id`]})),{successLabel:`Updated`})}};function De(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 Oe={command:`refresh <participant-id>`,describe:`Regenerates participant's authentication token for the given meeting and participant ID.`,builder:De,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit meetings participants tokens refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/meetings/${s[`meeting-id`]==null?`<meeting-id>`:encodeURIComponent(String(s[`meeting-id`]))}/participants/${s[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(s[`participant-id`]))}/token`,pathParams:{"app-id":String(s[`app-id`]??``),"meeting-id":String(s[`meeting-id`]??``),"participant-id":String(s[`participant-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Creating`,async()=>c.realtimekit.meetings.participants.tokens.refresh({account_id:l,app_id:s[`app-id`],meeting_id:s[`meeting-id`],participant_id:s[`participant-id`]})),{successLabel:`Created`})}},ke={command:`tokens`,describe:`Access tokens for RealtimeKit meeting participants`,builder:e=>e.command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(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 je={command:`update <participant-id>`,describe:`Updates a participant's details for the given meeting and participant ID.`,builder:Ae,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings participants update`,method:`PATCH`,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`]))}/participants/${u[`participant-id`]==null?`<participant-id>`:encodeURIComponent(String(u[`participant-id`]))}`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``),"participant-id":String(u[`participant-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({name:l(u.name,`name`,`text`),picture:l(u.picture,`picture`,`text`),preset_name:l(u[`preset-name`],`preset-name`,`text`)}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.realtimekit.meetings.participants.update({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`],participant_id:u[`participant-id`]})),{successLabel:`Updated`});return}let p=c({name:l(u.name,`name`,`text`),picture:l(u.picture,`picture`,`text`),preset_name:l(u[`preset-name`],`preset-name`,`text`)});i(await o(`Updating`,async()=>d.realtimekit.meetings.participants.update({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`],participant_id:u[`participant-id`]})),{successLabel:`Updated`})}},Me={command:`participants`,describe:`Participants in RealtimeKit meetings`,builder:e=>e.command(ve).command(be).command(Se).command(we).command(Ee).command(je).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ne(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 Pe={command:`replace <meeting-id>`,describe:`Replaces all the details for the given meeting ID.`,builder:Ne,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings replace`,method:`PUT`,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`]))}`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.realtimekit.meetings.replace({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`});return}let p=c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]});i(await o(`Updating`,async()=>d.realtimekit.meetings.replace({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`})}};function Fe(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 Ie={command:`update <meeting-id>`,describe:`Updates a meeting in an App for the given meeting ID.`,builder:Fe,handler:async u=>{if(u.dryRun){a({command:`cf realtimekit meetings update`,method:`PATCH`,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`]))}`,pathParams:{"app-id":String(u[`app-id`]??``),"meeting-id":String(u[`meeting-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],status:l(u.status,`status`,`text`),summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]}):s(u.body)});return}let d=await r(u),f=u.local?e:await t();if(u.accountId=f,u.body){let e=s(u.body);i(await o(`Updating`,async()=>d.realtimekit.meetings.update({...e,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`});return}let p=c({ai_config:{summarization:{summary_type:l(u[`ai-config-summarization-summary-type`],`ai-config-summarization-summary-type`,`text`),text_format:l(u[`ai-config-summarization-text-format`],`ai-config-summarization-text-format`,`text`),word_limit:u[`ai-config-summarization-word-limit`]},transcription:{keywords:u[`ai-config-transcription-keywords`],language:l(u[`ai-config-transcription-language`],`ai-config-transcription-language`,`text`),profanity_filter:u[`ai-config-transcription-profanity-filter`]}},live_stream_on_start:u[`live-stream-on-start`],persist_chat:u[`persist-chat`],record_on_start:u[`record-on-start`],recording_config:{audio_config:{channel:l(u[`recording-config-audio-config-channel`],`recording-config-audio-config-channel`,`text`),codec:l(u[`recording-config-audio-config-codec`],`recording-config-audio-config-codec`,`text`),export_file:u[`recording-config-audio-config-export-file`]},file_name_prefix:l(u[`recording-config-file-name-prefix`],`recording-config-file-name-prefix`,`text`),live_streaming_config:{rtmp_url:l(u[`recording-config-live-streaming-config-rtmp-url`],`recording-config-live-streaming-config-rtmp-url`,`text`)},max_seconds:u[`recording-config-max-seconds`],realtimekit_bucket_config:{enabled:u[`recording-config-realtimekit-bucket-config-enabled`]},video_config:{codec:l(u[`recording-config-video-config-codec`],`recording-config-video-config-codec`,`text`),export_file:u[`recording-config-video-config-export-file`],height:u[`recording-config-video-config-height`],watermark:{position:l(u[`recording-config-video-config-watermark-position`],`recording-config-video-config-watermark-position`,`text`),url:l(u[`recording-config-video-config-watermark-url`],`recording-config-video-config-watermark-url`,`text`)},width:u[`recording-config-video-config-width`]}},session_keep_alive_time_in_secs:u[`session-keep-alive-time-in-secs`],status:l(u.status,`status`,`text`),summarize_on_end:u[`summarize-on-end`],title:l(u.title,`title`,`text`),transcribe_on_end:u[`transcribe-on-end`]});i(await o(`Updating`,async()=>d.realtimekit.meetings.update({...p,account_id:f,app_id:u[`app-id`],meeting_id:u[`meeting-id`]})),{successLabel:`Updated`})}},Le={command:`meetings`,describe:`Meetings, participants, access tokens, and meeting livestreams`,builder:e=>e.command(se).command(le).command(de).command(Pe).command(Ie).command(ae).command(ge).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(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 ze={command:`create <app-id>`,describe:`Creates a preset belonging to the current App`,builder:Re,handler:async f=>{if(f.dryRun){a({command:`cf realtimekit presets 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`]))}/presets`,pathParams:{"app-id":String(f[`app-id`]??``)},bodyKind:`json`,body:f.body===void 0?c({config:{livestream_viewer_qualities:f[`config-livestream-viewer-qualities`],max_screenshare_count:f[`config-max-screenshare-count`],max_video_streams:{desktop:f[`config-max-video-streams-desktop`],mobile:f[`config-max-video-streams-mobile`]},media:{audio:{enable_high_bitrate:f[`config-media-audio-enable-high-bitrate`],enable_stereo:f[`config-media-audio-enable-stereo`]},screenshare:{frame_rate:f[`config-media-screenshare-frame-rate`],quality:l(f[`config-media-screenshare-quality`],`config-media-screenshare-quality`,`text`)},video:{frame_rate:f[`config-media-video-frame-rate`],quality:l(f[`config-media-video-quality`],`config-media-video-quality`,`text`),simulcast:f[`config-media-video-simulcast`]}},view_type:l(f[`config-view-type`],`config-view-type`,`text`)},name:l(f.name,`name`,`text`),permissions:{accept_stage_requests:f[`permissions-accept-stage-requests`],accept_waiting_requests:f[`permissions-accept-waiting-requests`],can_accept_production_requests:f[`permissions-can-accept-production-requests`],can_change_participant_permissions:f[`permissions-can-change-participant-permissions`],can_edit_display_name:f[`permissions-can-edit-display-name`],can_livestream:f[`permissions-can-livestream`],can_record:f[`permissions-can-record`],can_spotlight:f[`permissions-can-spotlight`],chat:{private:{can_receive:f[`permissions-chat-private-can-receive`],can_send:f[`permissions-chat-private-can-send`],files:f[`permissions-chat-private-files`],text:f[`permissions-chat-private-text`]},public:{can_send:f[`permissions-chat-public-can-send`],files:f[`permissions-chat-public-files`],text:f[`permissions-chat-public-text`]}},connected_meetings:{can_alter_connected_meetings:f[`permissions-connected-meetings-can-alter-connected-meetings`],can_switch_connected_meetings:f[`permissions-connected-meetings-can-switch-connected-meetings`],can_switch_to_parent_meeting:f[`permissions-connected-meetings-can-switch-to-parent-meeting`]},disable_participant_audio:f[`permissions-disable-participant-audio`],disable_participant_screensharing:f[`permissions-disable-participant-screensharing`],disable_participant_video:f[`permissions-disable-participant-video`],hidden_participant:f[`permissions-hidden-participant`],is_recorder:f[`permissions-is-recorder`],kick_participant:f[`permissions-kick-participant`],media:{audio:{can_produce:l(f[`permissions-media-audio-can-produce`],`permissions-media-audio-can-produce`,`text`)},screenshare:{can_produce:l(f[`permissions-media-screenshare-can-produce`],`permissions-media-screenshare-can-produce`,`text`)},video:{can_produce:l(f[`permissions-media-video-can-produce`],`permissions-media-video-can-produce`,`text`)}},pin_participant:f[`permissions-pin-participant`],plugins:{can_close:f[`permissions-plugins-can-close`],can_edit_config:f[`permissions-plugins-can-edit-config`],can_start:f[`permissions-plugins-can-start`]},polls:{can_create:f[`permissions-polls-can-create`],can_view:f[`permissions-polls-can-view`],can_vote:f[`permissions-polls-can-vote`]},recorder_type:l(f[`permissions-recorder-type`],`permissions-recorder-type`,`text`),show_participant_list:f[`permissions-show-participant-list`],stage_access:l(f[`permissions-stage-access`],`permissions-stage-access`,`text`),stage_enabled:f[`permissions-stage-enabled`],transcription_enabled:f[`permissions-transcription-enabled`],waiting_room_type:l(f[`permissions-waiting-room-type`],`permissions-waiting-room-type`,`text`)},ui:{design_tokens:{border_radius:l(f[`ui-design-tokens-border-radius`],`ui-design-tokens-border-radius`,`text`),border_width:l(f[`ui-design-tokens-border-width`],`ui-design-tokens-border-width`,`text`),colors:{danger:l(f[`ui-design-tokens-colors-danger`],`ui-design-tokens-colors-danger`,`text`),success:l(f[`ui-design-tokens-colors-success`],`ui-design-tokens-colors-success`,`text`),text:l(f[`ui-design-tokens-colors-text`],`ui-design-tokens-colors-text`,`text`),text_on_brand:l(f[`ui-design-tokens-colors-text-on-brand`],`ui-design-tokens-colors-text-on-brand`,`text`),video_bg:l(f[`ui-design-tokens-colors-video-bg`],`ui-design-tokens-colors-video-bg`,`text`),warning:l(f[`ui-design-tokens-colors-warning`],`ui-design-tokens-colors-warning`,`text`)},font_family:l(f[`ui-design-tokens-font-family`],`ui-design-tokens-font-family`,`text`),google_font:l(f[`ui-design-tokens-google-font`],`ui-design-tokens-google-font`,`text`),logo:l(f[`ui-design-tokens-logo`],`ui-design-tokens-logo`,`text`),spacing_base:f[`ui-design-tokens-spacing-base`],theme:l(f[`ui-design-tokens-theme`],`ui-design-tokens-theme`,`text`)}}}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.realtimekit.presets.create({body:e,account_id:m,app_id:f[`app-id`]})),{successLabel:`Created`});return}if(f[`config-max-screenshare-count`]===void 0)throw Error(`--config-max-screenshare-count is required (or pass --body with this field set).`);if(f[`config-max-video-streams-desktop`]===void 0)throw Error(`--config-max-video-streams-desktop is required (or pass --body with this field set).`);if(f[`config-max-video-streams-mobile`]===void 0)throw Error(`--config-max-video-streams-mobile is required (or pass --body with this field set).`);if(f[`config-media-screenshare-frame-rate`]===void 0)throw Error(`--config-media-screenshare-frame-rate is required (or pass --body with this field set).`);if(f[`config-media-screenshare-quality`]===void 0&&(f[`config-media-screenshare-quality`]=await d(`config-media-screenshare-quality`,`Quality of screen share `,[`hd`,`vga`,`qvga`,`fhd`,`uhd`])),f[`config-media-video-frame-rate`]===void 0)throw Error(`--config-media-video-frame-rate is required (or pass --body with this field set).`);if(f[`config-media-video-quality`]===void 0&&(f[`config-media-video-quality`]=await d(`config-media-video-quality`,`Video quality of participants`,[`hd`,`vga`,`qvga`,`fhd`,`uhd`])),f[`config-view-type`]===void 0&&(f[`config-view-type`]=await d(`config-view-type`,`Type of the meeting`,[`GROUP_CALL`,`WEBINAR`,`AUDIO_ROOM`,`LIVESTREAM`])),f.name===void 0&&(f.name=await u(`name`,`Name of the preset`)),f[`permissions-accept-waiting-requests`]===void 0)throw Error(`--permissions-accept-waiting-requests is required (or pass --body with this field set).`);if(f[`permissions-can-accept-production-requests`]===void 0)throw Error(`--permissions-can-accept-production-requests is required (or pass --body with this field set).`);if(f[`permissions-can-change-participant-permissions`]===void 0)throw Error(`--permissions-can-change-participant-permissions is required (or pass --body with this field set).`);if(f[`permissions-can-edit-display-name`]===void 0)throw Error(`--permissions-can-edit-display-name is required (or pass --body with this field set).`);if(f[`permissions-can-livestream`]===void 0)throw Error(`--permissions-can-livestream is required (or pass --body with this field set).`);if(f[`permissions-can-record`]===void 0)throw Error(`--permissions-can-record is required (or pass --body with this field set).`);if(f[`permissions-can-spotlight`]===void 0)throw Error(`--permissions-can-spotlight is required (or pass --body with this field set).`);if(f[`permissions-chat-private-can-receive`]===void 0)throw Error(`--permissions-chat-private-can-receive is required (or pass --body with this field set).`);if(f[`permissions-chat-private-can-send`]===void 0)throw Error(`--permissions-chat-private-can-send is required (or pass --body with this field set).`);if(f[`permissions-chat-private-files`]===void 0)throw Error(`--permissions-chat-private-files is required (or pass --body with this field set).`);if(f[`permissions-chat-private-text`]===void 0)throw Error(`--permissions-chat-private-text is required (or pass --body with this field set).`);if(f[`permissions-chat-public-can-send`]===void 0)throw Error(`--permissions-chat-public-can-send is required (or pass --body with this field set).`);if(f[`permissions-chat-public-files`]===void 0)throw Error(`--permissions-chat-public-files is required (or pass --body with this field set).`);if(f[`permissions-chat-public-text`]===void 0)throw Error(`--permissions-chat-public-text is required (or pass --body with this field set).`);if(f[`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(f[`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(f[`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(f[`permissions-disable-participant-audio`]===void 0)throw Error(`--permissions-disable-participant-audio is required (or pass --body with this field set).`);if(f[`permissions-disable-participant-screensharing`]===void 0)throw Error(`--permissions-disable-participant-screensharing is required (or pass --body with this field set).`);if(f[`permissions-disable-participant-video`]===void 0)throw Error(`--permissions-disable-participant-video is required (or pass --body with this field set).`);if(f[`permissions-hidden-participant`]===void 0)throw Error(`--permissions-hidden-participant is required (or pass --body with this field set).`);if(f[`permissions-kick-participant`]===void 0)throw Error(`--permissions-kick-participant is required (or pass --body with this field set).`);if(f[`permissions-media-audio-can-produce`]===void 0&&(f[`permissions-media-audio-can-produce`]=await d(`permissions-media-audio-can-produce`,`Can produce audio`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),f[`permissions-media-screenshare-can-produce`]===void 0&&(f[`permissions-media-screenshare-can-produce`]=await d(`permissions-media-screenshare-can-produce`,`Can produce screen share video`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),f[`permissions-media-video-can-produce`]===void 0&&(f[`permissions-media-video-can-produce`]=await d(`permissions-media-video-can-produce`,`Can produce video`,[`ALLOWED`,`NOT_ALLOWED`,`CAN_REQUEST`])),f[`permissions-pin-participant`]===void 0)throw Error(`--permissions-pin-participant is required (or pass --body with this field set).`);if(f[`permissions-plugins-can-close`]===void 0)throw Error(`--permissions-plugins-can-close is required (or pass --body with this field set).`);if(f[`permissions-plugins-can-edit-config`]===void 0)throw Error(`--permissions-plugins-can-edit-config is required (or pass --body with this field set).`);if(f[`permissions-plugins-can-start`]===void 0)throw Error(`--permissions-plugins-can-start is required (or pass --body with this field set).`);if(f[`permissions-polls-can-create`]===void 0)throw Error(`--permissions-polls-can-create is required (or pass --body with this field set).`);if(f[`permissions-polls-can-view`]===void 0)throw Error(`--permissions-polls-can-view is required (or pass --body with this field set).`);if(f[`permissions-polls-can-vote`]===void 0)throw Error(`--permissions-polls-can-vote is required (or pass --body with this field set).`);if(f[`permissions-recorder-type`]===void 0&&(f[`permissions-recorder-type`]=await d(`permissions-recorder-type`,`Type of the recording peer`,[`RECORDER`,`LIVESTREAMER`,`NONE`])),f[`permissions-show-participant-list`]===void 0)throw Error(`--permissions-show-participant-list is required (or pass --body with this field set).`);if(f[`permissions-waiting-room-type`]===void 0&&(f[`permissions-waiting-room-type`]=await d(`permissions-waiting-room-type`,`Waiting room type`,[`SKIP`,`ON_PRIVILEGED_USER_ENTRY`,`SKIP_ON_ACCEPT`])),f[`ui-design-tokens-border-radius`]===void 0&&(f[`ui-design-tokens-border-radius`]=await d(`ui-design-tokens-border-radius`,`The ui.design_tokens.border_radius field`,[`sharp`,`rounded`,`extra-rounded`,`circular`])),f[`ui-design-tokens-border-width`]===void 0&&(f[`ui-design-tokens-border-width`]=await d(`ui-design-tokens-border-width`,`The ui.design_tokens.border_width field`,[`none`,`thin`,`fat`])),f[`ui-design-tokens-colors-danger`]===void 0&&(f[`ui-design-tokens-colors-danger`]=await u(`ui-design-tokens-colors-danger`,`The ui.design_tokens.colors.danger field`)),f[`ui-design-tokens-colors-success`]===void 0&&(f[`ui-design-tokens-colors-success`]=await u(`ui-design-tokens-colors-success`,`The ui.design_tokens.colors.success field`)),f[`ui-design-tokens-colors-text`]===void 0&&(f[`ui-design-tokens-colors-text`]=await u(`ui-design-tokens-colors-text`,`The ui.design_tokens.colors.text field`)),f[`ui-design-tokens-colors-text-on-brand`]===void 0&&(f[`ui-design-tokens-colors-text-on-brand`]=await u(`ui-design-tokens-colors-text-on-brand`,`The ui.design_tokens.colors.text_on_brand field`)),f[`ui-design-tokens-colors-video-bg`]===void 0&&(f[`ui-design-tokens-colors-video-bg`]=await u(`ui-design-tokens-colors-video-bg`,`The ui.design_tokens.colors.video_bg field`)),f[`ui-design-tokens-colors-warning`]===void 0&&(f[`ui-design-tokens-colors-warning`]=await u(`ui-design-tokens-colors-warning`,`The ui.design_tokens.colors.warning field`)),f[`ui-design-tokens-spacing-base`]===void 0)throw Error(`--ui-design-tokens-spacing-base is required (or pass --body with this field set).`);f[`ui-design-tokens-theme`]===void 0&&(f[`ui-design-tokens-theme`]=await d(`ui-design-tokens-theme`,`The ui.design_tokens.theme field`,[`darkest`,`dark`,`light`]));let h=c({config:{livestream_viewer_qualities:f[`config-livestream-viewer-qualities`],max_screenshare_count:f[`config-max-screenshare-count`],max_video_streams:{desktop:f[`config-max-video-streams-desktop`],mobile:f[`config-max-video-streams-mobile`]},media:{audio:{enable_high_bitrate:f[`config-media-audio-enable-high-bitrate`],enable_stereo:f[`config-media-audio-enable-stereo`]},screenshare:{frame_rate:f[`config-media-screenshare-frame-rate`],quality:l(f[`config-media-screenshare-quality`],`config-media-screenshare-quality`,`text`)},video:{frame_rate:f[`config-media-video-frame-rate`],quality:l(f[`config-media-video-quality`],`config-media-video-quality`,`text`),simulcast:f[`config-media-video-simulcast`]}},view_type:l(f[`config-view-type`],`config-view-type`,`text`)},name:l(f.name,`name`,`text`),permissions:{accept_stage_requests:f[`permissions-accept-stage-requests`],accept_waiting_requests:f[`permissions-accept-waiting-requests`],can_accept_production_requests:f[`permissions-can-accept-production-requests`],can_change_participant_permissions:f[`permissions-can-change-participant-permissions`],can_edit_display_name:f[`permissions-can-edit-display-name`],can_livestream:f[`permissions-can-livestream`],can_record:f[`permissions-can-record`],can_spotlight:f[`permissions-can-spotlight`],chat:{private:{can_receive:f[`permissions-chat-private-can-receive`],can_send:f[`permissions-chat-private-can-send`],files:f[`permissions-chat-private-files`],text:f[`permissions-chat-private-text`]},public:{can_send:f[`permissions-chat-public-can-send`],files:f[`permissions-chat-public-files`],text:f[`permissions-chat-public-text`]}},connected_meetings:{can_alter_connected_meetings:f[`permissions-connected-meetings-can-alter-connected-meetings`],can_switch_connected_meetings:f[`permissions-connected-meetings-can-switch-connected-meetings`],can_switch_to_parent_meeting:f[`permissions-connected-meetings-can-switch-to-parent-meeting`]},disable_participant_audio:f[`permissions-disable-participant-audio`],disable_participant_screensharing:f[`permissions-disable-participant-screensharing`],disable_participant_video:f[`permissions-disable-participant-video`],hidden_participant:f[`permissions-hidden-participant`],is_recorder:f[`permissions-is-recorder`],kick_participant:f[`permissions-kick-participant`],media:{audio:{can_produce:l(f[`permissions-media-audio-can-produce`],`permissions-media-audio-can-produce`,`text`)},screenshare:{can_produce:l(f[`permissions-media-screenshare-can-produce`],`permissions-media-screenshare-can-produce`,`text`)},video:{can_produce:l(f[`permissions-media-video-can-produce`],`permissions-media-video-can-produce`,`text`)}},pin_participant:f[`permissions-pin-participant`],plugins:{can_close:f[`permissions-plugins-can-close`],can_edit_config:f[`permissions-plugins-can-edit-config`],can_start:f[`permissions-plugins-can-start`]},polls:{can_create:f[`permissions-polls-can-create`],can_view:f[`permissions-polls-can-view`],can_vote:f[`permissions-polls-can-vote`]},recorder_type:l(f[`permissions-recorder-type`],`permissions-recorder-type`,`text`),show_participant_list:f[`permissions-show-participant-list`],stage_access:l(f[`permissions-stage-access`],`permissions-stage-access`,`text`),stage_enabled:f[`permissions-stage-enabled`],transcription_enabled:f[`permissions-transcription-enabled`],waiting_room_type:l(f[`permissions-waiting-room-type`],`permissions-waiting-room-type`,`text`)},ui:{design_tokens:{border_radius:l(f[`ui-design-tokens-border-radius`],`ui-design-tokens-border-radius`,`text`),border_width:l(f[`ui-design-tokens-border-width`],`ui-design-tokens-border-width`,`text`),colors:{danger:l(f[`ui-design-tokens-colors-danger`],`ui-design-tokens-colors-danger`,`text`),success:l(f[`ui-design-tokens-colors-success`],`ui-design-tokens-colors-success`,`text`),text:l(f[`ui-design-tokens-colors-text`],`ui-design-tokens-colors-text`,`text`),text_on_brand:l(f[`ui-design-tokens-colors-text-on-brand`],`ui-design-tokens-colors-text-on-brand`,`text`),video_bg:l(f[`ui-design-tokens-colors-video-bg`],`ui-design-tokens-colors-video-bg`,`text`),warning:l(f[`ui-design-tokens-colors-warning`],`ui-design-tokens-colors-warning`,`text`)},font_family:l(f[`ui-design-tokens-font-family`],`ui-design-tokens-font-family`,`text`),google_font:l(f[`ui-design-tokens-google-font`],`ui-design-tokens-google-font`,`text`),logo:l(f[`ui-design-tokens-logo`],`ui-design-tokens-logo`,`text`),spacing_base:f[`ui-design-tokens-spacing-base`],theme:l(f[`ui-design-tokens-theme`],`ui-design-tokens-theme`,`text`)}}});i(await o(`Creating`,async()=>p.realtimekit.presets.create({body:h,account_id:m,app_id:f[`app-id`]})),{successLabel:`Created`})}};function Be(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 Ve={command:`delete <preset-id>`,describe:`Deletes a preset using the provided preset ID`,builder:Be,handler:async s=>{if(s.dryRun){a({command:`cf realtimekit presets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${s[`app-id`]==null?`<app-id>`:encodeURIComponent(String(s[`app-id`]))}/presets/${s[`preset-id`]==null?`<preset-id>`:encodeURIComponent(String(s[`preset-id`]))}`,pathParams:{"app-id":String(s[`app-id`]??``),"preset-id":String(s[`preset-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`This operation permanently deletes the preset.`})){process.stderr.write(`Aborted.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e}from"./theme-CrIBazAF.mjs";import{n as t,t as n}from"./local-
|
|
2
|
+
import{a as e}from"./theme-CrIBazAF.mjs";import{n as t,t as n}from"./local-DGiIS1uM.mjs";import{f as r,g as i}from"./oauth-DAa7SwkM.mjs";import{a,o,r as s}from"./auth-DY_Y2bXC.mjs";import{t as c}from"./output-BqDR9h74.mjs";import{t as l}from"./dry-run-ILZRVpnp.mjs";import{t as u}from"./progress-jYW64HY7.mjs";import{i as d,n as f,t as p}from"./body-parser-BGVbwPeM.mjs";import{n as m}from"./input-validation-1esLElok.mjs";import{a as h,i as g,n as ee,o as _,r as v}from"./prompt-CyATfGUu.mjs";import{t as y}from"./cli-types-C3nVfpSG.mjs";import{_ as b,a as x,c as S,d as C,g as w,h as T,i as E,m as D,o as O,p as k,r as A,s as j,t as te,u as ne}from"./schema-flags-CTfQVGCs.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 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=>{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
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:y(se),handler:async e=>{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 M(e,t,n){let r=_(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?``:` (${_(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 N=`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:D(e)}}let a=T(i,`registration_schema`);return a?{ok:!0,extension:e,schema:a}:{ok:!1,reason:`the API returned no registration schema for .${e}`}}async function P(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=w(N,[n,e]);if(t)return{ok:!0,extension:e,schema:t};if(!o)try{o=await r()}catch(e){return{ok:!1,reason:D(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 b(N,[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 F(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function me(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 I(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function L(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function he(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=L(n,e),i=I(t),a=F(r?.choiceLabels,i);if(a)return`${a} (${i})`;let o=(r?.schema.oneOf??r?.schema.anyOf)?.find(e=>e.title&&C(e,t).length===0);return o?.title?`${o.title} (${i})`:i}function ge(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:F(pe,n)??me(n)).join(` · `)}function R(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(...R(a,t,e));continue}let o=L(t,e);r.push([ge(e,o),he(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function z(e,t,n){if(Object.hasOwn(e,n))return I(e[n]);let r=_e(t,n);return r===void 0?`API default`:`${I(r)} (default)`}function B(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(B)]}function V(e,t){return e===void 0?[]:[...B(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>V(e,t))]}function _e(e,t){let n=V(e,t),r=n[0];return n.length>0&&n.every(e=>re(e,r))?r:void 0}function H(t){let n=t.map(([e,t])=>[_(e),_(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 ve(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`,z(t.body,t.schema,`auto_renew`)],[`Privacy mode`,z(t.body,t.schema,`privacy_mode`)]],r=R(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...H(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...H(r)]:[],`│`].join(`
|
|
5
5
|
`)}const U=[`domain_name`],W=`Fully qualified domain name to register, e.g. example.travel`,G=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function ye(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function be(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 xe(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 Se(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:_(n);return{path:ye(e.path),flag:`--${e.name}`,question:j(e),description:r,choices:xe(e)?.map(t=>{let n=String(t);return{value:t,label:_(e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function K(e,t,n,r,i){let a=x(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(Se),validationErrors:i}),!0)}function q(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function Ce(e,t){let n=q(e.registration_cost),r=q(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 we(e,t){let n=Ce(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 J(e,t){return e.flatMap(e=>t.map(t=>[...e,...t]))}function Y(e,t,n,r=!1,i=[]){let a=e.properties?.[t],o=a!==void 0,s=[a===void 0?[]:[a]],c=e.if&&e.then&&A(e.if)&&C(e.if,n).length===0?[e.then]:[];for(let a of[...e.allOf??[],...c]){let e=Y(a,t,n,r,i);e.found&&(o=!0,s=J(s,e.bundles))}for(let a of[e.oneOf,e.anyOf]){if(!a?.length)continue;let e=r&&a.every(A)?a.filter(e=>Oe(e,t,n,i)):[],c=(e.length>0?e:a).map(e=>Y(e,t,n,r,i));c.some(e=>e.found)&&(o=!0,s=J(s,c.flatMap(e=>e.bundles)))}return{found:o,bundles:s}}function X(e,t){let n=e[t];return[...n===void 0?[]:[n],...(e.allOf??[]).flatMap(e=>X(e,t))]}function Z(e){return e.length===0?{}:e.length===1?e[0]??{}:{allOf:e}}function Te(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=Te(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function Ee(e){let t=X(e,`const`);if(t.length>0)return t.every(e=>Object.is(e,t[0]))?{found:!0,value:t[0]}:{found:!1};let n=X(e,`default`);if(n.length>0)return n.every(e=>Object.is(e,n[0]))?{found:!0,value:n[0]}:{found:!1};let r=Te(e);return r===void 0?{found:!1}:{found:!0,value:r}}function Q(e){let{allOf:t,anyOf:n,oneOf:r,...i}=e,a=[Object.keys(i).length===0?[]:[i]];for(let e of t??[])a=J(a,Q(e).map(e=>[e]));for(let e of[r,n])e?.length&&(a=J(a,e.flatMap(e=>Q(e).map(e=>[e]))));return a.map(Z)}function De(e){return e.flatMap(e=>Q(e).map(t=>({schema:e,candidate:Ee(t)})))}function Oe(e,t,n,r){let i=C(e,n);return Object.hasOwn(n,t)||i.length===0?i.length===0:r.some(r=>C(e,{...n,[t]:r}).length===0)}function ke(e,t){let n=Object.hasOwn(e,`years`),r=Y(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(Z),a=Y(t,`years`,e,!0,n?[]:De(i).flatMap(({schema:e,candidate:t})=>t.found&&C(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(Z),s=o,c,l;if(n)l=e.years;else{let n=De(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=C(e,t.value);return n===void 0?!0:(c??=n,!1)});if(A(t)){let r=n.filter(({candidate:e})=>!e.found),i=n.filter(({candidate:n})=>n.found&&C(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?C(o.length===1?o[0]??{}:{anyOf:o},l):s.flatMap(e=>C(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 Ae;function $(e){let t=m(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function je(e){return Ae=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 Me(t){Ae?.showHelp(`log`);let n=$(t[`domain-name`]);if(!n)return;let r=_(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let i=Date.now()+k,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 P(n,t.extension,a,()=>s(t),i);console.log(c.ok?`\n${O(S(c.schema,{exclude:[U]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${_(c.reason)}.`)}`)}async function Ne(e,t,n){for(;;){let r=E(e,t,n);if(r.length===0)return!0;for(let e of r){let n=e.description??``,r=j(e);if(e.type===`boolean`&&e.schema.const===!0){let r=_(e.schema.description??n);if(!await v(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await g(e.name,r,e.choices,e.choiceLabels):t[e.name]=await h(e.name,r,{validate:t=>ne(e,t)})}}}function Pe(e){let t=f(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function Fe(e){let t;if(e.startsWith(`@`))t=m(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}const Ie={command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:je,handler:async e=>{if(e.help){await Me(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=te([],e,{reserved:G}).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=Pe(e.body)}let d=e.contacts===void 0?void 0:Fe(e.contacts),f=$(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 '${_(f)}' does not match --body domain_name '${_(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:W}],validationErrors:["`/domain_name` is required"]});return}m=await h(`domain-name`,W)}let g=_(m);o&&(o.domain_name=m);let v=e.dryRun?await i()??`<account-id>`:await r(),y,b=async()=>(y||=await s(e),y);e.dryRun||await M(await b(),v,m);let x=await P(m,e.extension,v,b);if(!x.ok)throw Error(`Could not load the registration schema for ${g}: ${_(x.reason)}.`);let w=_(x.extension),T=x.schema,E=S(x.schema,{exclude:[U]});if(!o){if(d!==void 0&&be(`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 Ne(E,t,n))return;let r=te(E,t,{reserved:G,baseBody:n});if(r.errors.length>0)throw Error(`${r.errors.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{a as r,r as i}from"./auth-DY_Y2bXC.mjs";import{t as a}from"./output-BqDR9h74.mjs";import{t as o}from"./dry-run-ILZRVpnp.mjs";import{t as s}from"./progress-jYW64HY7.mjs";import{i as c,n as l,t as u}from"./body-parser-BGVbwPeM.mjs";import{n as d}from"./input-validation-1esLElok.mjs";import{a as f}from"./prompt-CyATfGUu.mjs";import{t as p}from"./cli-types-C3nVfpSG.mjs";function m(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 h={command:`get <extension>`,describe:"Returns metadata and JSON Schema documents describing the expected input structure for registration 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:m,handler:async r=>{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 g(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
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 _={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:p(g),handler:async r=>{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`})}},v={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`domains`,{type:`string`,array:!0,description:`List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension.
|
|
5
5
|
- Minimum: 1 domain.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./cf-
|
|
2
|
+
import{i as e}from"./cf-yPz_IqW6.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-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s}from"./body-parser-BGVbwPeM.mjs";function c(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Gets the industry classification for an account.`,builder:c,handler:async s=>{if(s.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 c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.reporting.industry.get({account_id:l})),{successLabel:`Loaded`})}};function u(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const d={command:`update`,describe:`Updates the industry classification for an account.`,builder:u,handler:async c=>{if(c.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:c.body===void 0?void 0:s(c.body)});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,c.body){let e=s(c.body);i(await o(`Updating`,async()=>l.reporting.industry.update({...e,account_id:u})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},f={command:`industry`,describe:`Operations for industry`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function p(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 m={command:`get <policy-id>`,describe:`Gets a reporting policy by identifier.`,builder:p,handler:async s=>{if(s.dryRun){a({command:`cf reporting policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/policies/${s[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(s[`policy-id`]))}`,pathParams:{"policy-id":String(s[`policy-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.reporting.policies.get({account_id:l,policy_id:s[`policy-id`]})),{successLabel:`Loaded`})}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Lists all reporting policies for an account.`,builder:h,handler:async s=>{if(s.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 c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.reporting.policies.list({account_id:l})),{successLabel:`Loaded`})}},_={command:`policies`,describe:`Operations for policies`,builder:e=>e.command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(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 y={command:`get <report-id>`,describe:`Gets a generated report by identifier.`,builder:v,handler:async s=>{if(s.dryRun){a({command:`cf reporting reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/reporting/reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}`,pathParams:{"report-id":String(s[`report-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.reporting.reports.get({account_id:l,report_id:s[`report-id`]})),{successLabel:`Loaded`})}};function b(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`Lists all generated reports for an account.`,builder:b,handler:async s=>{if(s.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 c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.reporting.reports.list({account_id:l})),{successLabel:`Loaded`})}},S={command:`reports`,describe:`Operations for reports`,builder:e=>e.command(y).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},C={command:`reporting`,describe:`reporting`,builder:e=>e.command(f).command(_).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{C as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u}from"./prompt-CyATfGUu.mjs";function d(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 f={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:d,handler:async d=>{if(d.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:d.body===void 0?c({body:{base64:l(d[`body-base64`],`body-base64`,`text`),plain_text:l(d[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:d[`context-bot-score`],geoloc:{city:l(d[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:l(d[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:d[`context-geoloc-is-eu-country`],iso_code:l(d[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:d[`context-geoloc-latitude`],longitude:d[`context-geoloc-longitude`],postal_code:l(d[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:l(d[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:l(d[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:l(d[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:d[`context-skip-challenge`],threat_score:d[`context-threat-score`]},method:l(d.method,`method`,`text`),protocol:l(d.protocol,`protocol`,`text`),skip_response:d[`skip-response`],url:l(d.url,`url`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.requestTracers.traces.create({...e,account_id:p})),{successLabel:`Created`});return}d.method===void 0&&(d.method=await u(`method`,`HTTP Method of tracing request`)),d.url===void 0&&(d.url=await u(`url`,`URL to which perform tracing request`));let m=c({body:{base64:l(d[`body-base64`],`body-base64`,`text`),plain_text:l(d[`body-plain-text`],`body-plain-text`,`text`)},context:{bot_score:d[`context-bot-score`],geoloc:{city:l(d[`context-geoloc-city`],`context-geoloc-city`,`text`),continent:l(d[`context-geoloc-continent`],`context-geoloc-continent`,`text`),is_eu_country:d[`context-geoloc-is-eu-country`],iso_code:l(d[`context-geoloc-iso-code`],`context-geoloc-iso-code`,`text`),latitude:d[`context-geoloc-latitude`],longitude:d[`context-geoloc-longitude`],postal_code:l(d[`context-geoloc-postal-code`],`context-geoloc-postal-code`,`text`),region_code:l(d[`context-geoloc-region-code`],`context-geoloc-region-code`,`text`),subdivision_2_iso_code:l(d[`context-geoloc-subdivision-2-iso-code`],`context-geoloc-subdivision-2-iso-code`,`text`),timezone:l(d[`context-geoloc-timezone`],`context-geoloc-timezone`,`text`)},skip_challenge:d[`context-skip-challenge`],threat_score:d[`context-threat-score`]},method:l(d.method,`method`,`text`),protocol:l(d.protocol,`protocol`,`text`),skip_response:d[`skip-response`],url:l(d.url,`url`,`text`)});i(await o(`Creating`,async()=>f.requestTracers.traces.create({...m,account_id:p})),{successLabel:`Created`})}},p={command:`traces`,describe:`Simulate request processing to debug rule matches, transforms, and routing decisions`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`request-tracers`,describe:`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s}from"./body-parser-BGVbwPeM.mjs";import{n as c}from"./prompt-CyATfGUu.mjs";function l(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const u={command:`create <share-id>`,describe:`Excludes a single account from an organization-targeted share. The share continues to target the entire organization, but the excluded account is skipped during reconciliation.`,builder:l,handler:async e=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Creating`,async()=>t.resourceSharing.excludedRecipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{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 d(e){return e.positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share 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 f={command:`delete <excluded-recipient-id>`,describe:`Removes a single account from a share's excluded-recipient list. The account becomes eligible to receive the share again on the next reconciliation cycle.`,builder:d,handler:async s=>{if(s.dryRun){a({command:`cf resource-sharing excluded-recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}/excluded-recipients/${s[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(s[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``),"excluded-recipient-id":String(s[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();if(s.accountId=u,!await c({force:!!s.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>l.resourceSharing.excludedRecipients.delete({account_id:u,share_id:s[`share-id`],excluded_recipient_id:s[`excluded-recipient-id`]})),{successLabel:`Deleted`})}};function p(e){return e.positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <excluded-recipient-id>`,describe:`Gets a single excluded recipient of a share by its identifier tag.`,builder:p,handler:async s=>{if(s.dryRun){a({command:`cf resource-sharing excluded-recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}/excluded-recipients/${s[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(s[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``),"excluded-recipient-id":String(s[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.resourceSharing.excludedRecipients.get({account_id:l,share_id:s[`share-id`],excluded_recipient_id:s[`excluded-recipient-id`]})),{successLabel:`Loaded`})}};function h(e){return e.option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:"Lists the accounts excluded from an organization-targeted share. Only valid for shares with `target_type=organization`.",builder:h,handler:async e=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing excluded-recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e);i(await o(`Loading`,async()=>n.resourceSharing.excludedRecipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...t})),{successLabel:`Loaded`})}};function _(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`update <share-id>`,describe:"Reconciles a share's excluded recipients to match the given list. Only valid for shares with `target_type=organization`.",builder:_,handler:async e=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Updating`,async()=>t.resourceSharing.excludedRecipients.update({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},y={command:`excluded-recipients`,describe:`Operations for excluded-recipients`,builder:e=>e.command(u).command(f).command(m).command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`resource-sharing`,describe:`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";function s(e){return e.option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get`,describe:`Lists all distinct tag keys and their distinct values across resources in an account.`,builder:s,handler:async s=>{let c={cursor:s.cursor};if(s.dryRun){a({command:`cf resource-tagging summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/summary`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.resourceTagging.summary.get({account_id:u,...c})),{successLabel:`Loaded`})}},l={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},u={command:`resource-tagging`,describe:`resource-tagging`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
|