@senators/bifrost-cli 0.0.0-stage → 7.0.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/LICENSE +21 -0
- package/README.md +180 -2
- package/out/accountEditor-CQB91PVf.js +2 -0
- package/out/accountEditor-CQB91PVf.js.map +1 -0
- package/out/achievements-Df5qqpYQ.js +2 -0
- package/out/achievements-Df5qqpYQ.js.map +1 -0
- package/out/active-CnUKpiEo.js +2 -0
- package/out/active-CnUKpiEo.js.map +1 -0
- package/out/alliance-BsPnhi7w.js +2 -0
- package/out/alliance-BsPnhi7w.js.map +1 -0
- package/out/allianceAdmin-Bkyl6ev4.js +2 -0
- package/out/allianceAdmin-Bkyl6ev4.js.map +1 -0
- package/out/arsenal-BMCmAHzv.js +2 -0
- package/out/arsenal-BMCmAHzv.js.map +1 -0
- package/out/ban-BXNvHPMq.js +2 -0
- package/out/ban-BXNvHPMq.js.map +1 -0
- package/out/banList-3DbCToEy.js +2 -0
- package/out/banList-3DbCToEy.js.map +1 -0
- package/out/banList-dT5GF5eO.js +2 -0
- package/out/banList-dT5GF5eO.js.map +1 -0
- package/out/battleHall-C4BALP6S.js +2 -0
- package/out/battleHall-C4BALP6S.js.map +1 -0
- package/out/battleHall-P7Co1jS5.js +2 -0
- package/out/battleHall-P7Co1jS5.js.map +1 -0
- package/out/battleReport-BG0-S-bF.js +2 -0
- package/out/battleReport-BG0-S-bF.js.map +1 -0
- package/out/battleReport-C3PQTXxc.js +2 -0
- package/out/battleReport-C3PQTXxc.js.map +1 -0
- package/out/battleSimulator-BOySErLn.js +2 -0
- package/out/battleSimulator-BOySErLn.js.map +1 -0
- package/out/board-CsNgDx4j.js +2 -0
- package/out/board-CsNgDx4j.js.map +1 -0
- package/out/board-DSCl8eU8.js +2 -0
- package/out/board-DSCl8eU8.js.map +1 -0
- package/out/bonusSummary-Dmm646zj.js +2 -0
- package/out/bonusSummary-Dmm646zj.js.map +1 -0
- package/out/buddyList-B50t-9_g.js +2 -0
- package/out/buddyList-B50t-9_g.js.map +1 -0
- package/out/buildings-CXrMgFyb.js +2 -0
- package/out/buildings-CXrMgFyb.js.map +1 -0
- package/out/catalog-DmSXp_YG.js +2 -0
- package/out/catalog-DmSXp_YG.js.map +1 -0
- package/out/chat-BvtMl-I7.js +2 -0
- package/out/chat-BvtMl-I7.js.map +1 -0
- package/out/clearCache-79cjREI0.js +2 -0
- package/out/clearCache-79cjREI0.js.map +1 -0
- package/out/cli.js +3 -0
- package/out/cli.js.map +1 -0
- package/out/containers-BhguCCkz.js +2 -0
- package/out/containers-BhguCCkz.js.map +1 -0
- package/out/control-IJRy1LDx.js +2 -0
- package/out/control-IJRy1LDx.js.map +1 -0
- package/out/create-D-IygCER.js +2 -0
- package/out/create-D-IygCER.js.map +1 -0
- package/out/createMoon-BMWjdwO0.js +2 -0
- package/out/createMoon-BMWjdwO0.js.map +1 -0
- package/out/cronjob-CCJKDSuv.js +2 -0
- package/out/cronjob-CCJKDSuv.js.map +1 -0
- package/out/dailyBonus-2UwWD4D0.js +2 -0
- package/out/dailyBonus-2UwWD4D0.js.map +1 -0
- package/out/delivery-d8NKP-f1.js +2 -0
- package/out/delivery-d8NKP-f1.js.map +1 -0
- package/out/disclaimer-BmejHZqk.js +2 -0
- package/out/disclaimer-BmejHZqk.js.map +1 -0
- package/out/dump--mJa5m3e.js +2 -0
- package/out/dump--mJa5m3e.js.map +1 -0
- package/out/endpoints-CbZGTbF-.js +2 -0
- package/out/endpoints-CbZGTbF-.js.map +1 -0
- package/out/externalAuth-Dwl3VAHa.js +2 -0
- package/out/externalAuth-Dwl3VAHa.js.map +1 -0
- package/out/findDebris-DOMvMC1l.js +2 -0
- package/out/findDebris-DOMvMC1l.js.map +1 -0
- package/out/fleet-DyITa_Xu.js +2 -0
- package/out/fleet-DyITa_Xu.js.map +1 -0
- package/out/fleetAjax-BGxyUtdi.js +2 -0
- package/out/fleetAjax-BGxyUtdi.js.map +1 -0
- package/out/fleetDealer-n6LM_8IT.js +2 -0
- package/out/fleetDealer-n6LM_8IT.js.map +1 -0
- package/out/fleetMissile-CucQvNmZ.js +2 -0
- package/out/fleetMissile-CucQvNmZ.js.map +1 -0
- package/out/fleetStep1-wp-NgTsC.js +2 -0
- package/out/fleetStep1-wp-NgTsC.js.map +1 -0
- package/out/fleetStep2-C-GzHXyn.js +2 -0
- package/out/fleetStep2-C-GzHXyn.js.map +1 -0
- package/out/fleetStep3-D_fqImWm.js +2 -0
- package/out/fleetStep3-D_fqImWm.js.map +1 -0
- package/out/fleetTable-BpWLh0R1.js +2 -0
- package/out/fleetTable-BpWLh0R1.js.map +1 -0
- package/out/flyingFleet-ClIrGPJz.js +2 -0
- package/out/flyingFleet-ClIrGPJz.js.map +1 -0
- package/out/galaxy-B12wKQUU.js +2 -0
- package/out/galaxy-B12wKQUU.js.map +1 -0
- package/out/get-Cn2hFvGS.js +2 -0
- package/out/get-Cn2hFvGS.js.map +1 -0
- package/out/giveaway-CDWEArOF.js +2 -0
- package/out/giveaway-CDWEArOF.js.map +1 -0
- package/out/growth-C_-C8rLD.js +2 -0
- package/out/growth-C_-C8rLD.js.map +1 -0
- package/out/index.d.ts +29 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js +1 -0
- package/out/information-CqfqYCH1.js +2 -0
- package/out/information-CqfqYCH1.js.map +1 -0
- package/out/information-DK93hgyE.js +2 -0
- package/out/information-DK93hgyE.js.map +1 -0
- package/out/log-BBE1Jt9i.js +2 -0
- package/out/log-BBE1Jt9i.js.map +1 -0
- package/out/login--4vqysQx.js +2 -0
- package/out/login--4vqysQx.js.map +1 -0
- package/out/login-C_DqRApn.js +2 -0
- package/out/login-C_DqRApn.js.map +1 -0
- package/out/logout-BYnLiMja.js +2 -0
- package/out/logout-BYnLiMja.js.map +1 -0
- package/out/logout-BsCSXzv8.js +2 -0
- package/out/logout-BsCSXzv8.js.map +1 -0
- package/out/lostPassword-Pc_1CUBD.js +2 -0
- package/out/lostPassword-Pc_1CUBD.js.map +1 -0
- package/out/market-DN8cY1tr.js +2 -0
- package/out/market-DN8cY1tr.js.map +1 -0
- package/out/messageList-k_zW_D0G.js +2 -0
- package/out/messageList-k_zW_D0G.js.map +1 -0
- package/out/messages-D461yIe6.js +2 -0
- package/out/messages-D461yIe6.js.map +1 -0
- package/out/missions-5zZtlLIm.js +2 -0
- package/out/missions-5zZtlLIm.js.map +1 -0
- package/out/module-BEPeTBhK.js +2 -0
- package/out/module-BEPeTBhK.js.map +1 -0
- package/out/multiIp-CP3lub1T.js +2 -0
- package/out/multiIp-CP3lub1T.js.map +1 -0
- package/out/new-star-BaVTTcIn.js +2 -0
- package/out/new-star-BaVTTcIn.js.map +1 -0
- package/out/news-BdDDcd-M.js +2 -0
- package/out/news-BdDDcd-M.js.map +1 -0
- package/out/news-Dd1C9JDl.js +2 -0
- package/out/news-Dd1C9JDl.js.map +1 -0
- package/out/notes-DLngBta3.js +2 -0
- package/out/notes-DLngBta3.js.map +1 -0
- package/out/overview-CzcSTNla.js +2 -0
- package/out/overview-CzcSTNla.js.map +1 -0
- package/out/overview-wQWIR_CB.js +2 -0
- package/out/overview-wQWIR_CB.js.map +1 -0
- package/out/password-ZA_1lStC.js +2 -0
- package/out/password-ZA_1lStC.js.map +1 -0
- package/out/phalanx-DaMaoJCT.js +2 -0
- package/out/phalanx-DaMaoJCT.js.map +1 -0
- package/out/planet-CecZ2cAZ.js +2 -0
- package/out/planet-CecZ2cAZ.js.map +1 -0
- package/out/playerCard-BG711xQi.js +2 -0
- package/out/playerCard-BG711xQi.js.map +1 -0
- package/out/post-C_ywAss7.js +2 -0
- package/out/post-C_ywAss7.js.map +1 -0
- package/out/production-D8SZfez8.js +2 -0
- package/out/production-D8SZfez8.js.map +1 -0
- package/out/public-TVVf75qu.js +2 -0
- package/out/public-TVVf75qu.js.map +1 -0
- package/out/questions-NwzZ5_fL.js +2 -0
- package/out/questions-NwzZ5_fL.js.map +1 -0
- package/out/quickEditor-DEJQFH0f.js +2 -0
- package/out/quickEditor-DEJQFH0f.js.map +1 -0
- package/out/records-CDVglYGy.js +2 -0
- package/out/records-CDVglYGy.js.map +1 -0
- package/out/records-Djjz9kxk.js +2 -0
- package/out/records-Djjz9kxk.js.map +1 -0
- package/out/reduceFleet-y8p89weR.js +2 -0
- package/out/reduceFleet-y8p89weR.js.map +1 -0
- package/out/reduceResources-CnGJ9fuf.js +2 -0
- package/out/reduceResources-CnGJ9fuf.js.map +1 -0
- package/out/refreshStatistics-CjGWyNc_.js +2 -0
- package/out/refreshStatistics-CjGWyNc_.js.map +1 -0
- package/out/register-4x5hZcWe.js +2 -0
- package/out/register-4x5hZcWe.js.map +1 -0
- package/out/research-dTK3-tOW.js +2 -0
- package/out/research-dTK3-tOW.js.map +1 -0
- package/out/reset-CHiMI9rj.js +2 -0
- package/out/reset-CHiMI9rj.js.map +1 -0
- package/out/resources-CjnevA41.js +2 -0
- package/out/resources-CjnevA41.js.map +1 -0
- package/out/rights-WPf-j_YF.js +2 -0
- package/out/rights-WPf-j_YF.js.map +1 -0
- package/out/rules-E29jtQRj.js +2 -0
- package/out/rules-E29jtQRj.js.map +1 -0
- package/out/runner-C2bQQS2G.js +43 -0
- package/out/runner-C2bQQS2G.js.map +1 -0
- package/out/scan-RvWZeyyM.js +2 -0
- package/out/scan-RvWZeyyM.js.map +1 -0
- package/out/screens-CZ4g-KNp.js +2 -0
- package/out/screens-CZ4g-KNp.js.map +1 -0
- package/out/search-BYvqiUBF.js +2 -0
- package/out/search-BYvqiUBF.js.map +1 -0
- package/out/search-auPbK2Xc.js +2 -0
- package/out/search-auPbK2Xc.js.map +1 -0
- package/out/sendMessages-B2Uj3PW4.js +2 -0
- package/out/sendMessages-B2Uj3PW4.js.map +1 -0
- package/out/settings-DFFa6Ush.js +2 -0
- package/out/settings-DFFa6Ush.js.map +1 -0
- package/out/settings-Ddez5x9U.js +2 -0
- package/out/settings-Ddez5x9U.js.map +1 -0
- package/out/shared-DoaW4mlX.js +2 -0
- package/out/shared-DoaW4mlX.js.map +1 -0
- package/out/shipyard-DXr745hR.js +2 -0
- package/out/shipyard-DXr745hR.js.map +1 -0
- package/out/shops-CEE02c0g.js +2 -0
- package/out/shops-CEE02c0g.js.map +1 -0
- package/out/snapshot-CrJ8l50N.js +2 -0
- package/out/snapshot-CrJ8l50N.js.map +1 -0
- package/out/social-1Gdni-jZ.js +2 -0
- package/out/social-1Gdni-jZ.js.map +1 -0
- package/out/spec-CrkWB0BN.js +2 -0
- package/out/spec-CrkWB0BN.js.map +1 -0
- package/out/statistics-zg3aVAvW.js +2 -0
- package/out/statistics-zg3aVAvW.js.map +1 -0
- package/out/store-dXG7NoB4.js +2 -0
- package/out/store-dXG7NoB4.js.map +1 -0
- package/out/support-DisUQr57.js +2 -0
- package/out/support-DisUQr57.js.map +1 -0
- package/out/techtree-Ba3FEH5_.js +2 -0
- package/out/techtree-Ba3FEH5_.js.map +1 -0
- package/out/ticket-O_8jTKW8.js +2 -0
- package/out/ticket-O_8jTKW8.js.map +1 -0
- package/out/trader-zFDGaHZ9.js +2 -0
- package/out/trader-zFDGaHZ9.js.map +1 -0
- package/out/universe-DO32RnLQ.js +2 -0
- package/out/universe-DO32RnLQ.js.map +1 -0
- package/out/universeSettings-S7enRJR4.js +2 -0
- package/out/universeSettings-S7enRJR4.js.map +1 -0
- package/out/values-gwcnIHXs.js +2 -0
- package/out/values-gwcnIHXs.js.map +1 -0
- package/out/verify-sYnZ9juV.js +2 -0
- package/out/verify-sYnZ9juV.js.map +1 -0
- package/out/version-Cgs-grc5.js +2 -0
- package/out/version-Cgs-grc5.js.map +1 -0
- package/package.json +65 -4
- package/src/admin.ts +317 -0
- package/src/arguments.ts +323 -0
- package/src/catalog.ts +117 -0
- package/src/cli.ts +29 -0
- package/src/commands/admin/accountEditor.ts +33 -0
- package/src/commands/admin/active.ts +25 -0
- package/src/commands/admin/ban.ts +59 -0
- package/src/commands/admin/clearCache.ts +12 -0
- package/src/commands/admin/create.ts +59 -0
- package/src/commands/admin/cronjob.ts +94 -0
- package/src/commands/admin/dump.ts +25 -0
- package/src/commands/admin/flyingFleet.ts +25 -0
- package/src/commands/admin/giveaway.ts +37 -0
- package/src/commands/admin/information.ts +12 -0
- package/src/commands/admin/log.ts +37 -0
- package/src/commands/admin/login.ts +15 -0
- package/src/commands/admin/logout.ts +12 -0
- package/src/commands/admin/messageList.ts +19 -0
- package/src/commands/admin/module.ts +25 -0
- package/src/commands/admin/multiIp.ts +25 -0
- package/src/commands/admin/news.ts +40 -0
- package/src/commands/admin/overview.ts +12 -0
- package/src/commands/admin/password.ts +18 -0
- package/src/commands/admin/quickEditor.ts +30 -0
- package/src/commands/admin/refreshStatistics.ts +12 -0
- package/src/commands/admin/reset.ts +26 -0
- package/src/commands/admin/rights.ts +68 -0
- package/src/commands/admin/search.ts +31 -0
- package/src/commands/admin/sendMessages.ts +26 -0
- package/src/commands/admin/support.ts +48 -0
- package/src/commands/admin/universe.ts +49 -0
- package/src/commands/admin/universeSettings.ts +32 -0
- package/src/commands/game/achievements.ts +18 -0
- package/src/commands/game/alliance.ts +248 -0
- package/src/commands/game/allianceAdmin.ts +236 -0
- package/src/commands/game/arsenal.ts +12 -0
- package/src/commands/game/banList.ts +20 -0
- package/src/commands/game/battleHall.ts +21 -0
- package/src/commands/game/battleReport.ts +20 -0
- package/src/commands/game/battleSimulator.ts +41 -0
- package/src/commands/game/board.ts +12 -0
- package/src/commands/game/bonusSummary.ts +12 -0
- package/src/commands/game/buddyList.ts +76 -0
- package/src/commands/game/buildings.ts +81 -0
- package/src/commands/game/chat.ts +12 -0
- package/src/commands/game/containers.ts +33 -0
- package/src/commands/game/control.ts +16 -0
- package/src/commands/game/createMoon.ts +28 -0
- package/src/commands/game/dailyBonus.ts +18 -0
- package/src/commands/game/delivery.ts +34 -0
- package/src/commands/game/endpoints.ts +61 -0
- package/src/commands/game/findDebris.ts +16 -0
- package/src/commands/game/fleetAjax.ts +24 -0
- package/src/commands/game/fleetDealer.ts +36 -0
- package/src/commands/game/fleetMissile.ts +25 -0
- package/src/commands/game/fleetStep1.ts +74 -0
- package/src/commands/game/fleetStep2.ts +27 -0
- package/src/commands/game/fleetStep3.ts +28 -0
- package/src/commands/game/fleetTable.ts +96 -0
- package/src/commands/game/galaxy.ts +26 -0
- package/src/commands/game/growth.ts +313 -0
- package/src/commands/game/information.ts +56 -0
- package/src/commands/game/logout.ts +12 -0
- package/src/commands/game/market.ts +67 -0
- package/src/commands/game/messages.ts +129 -0
- package/src/commands/game/notes.ts +65 -0
- package/src/commands/game/overview.ts +49 -0
- package/src/commands/game/phalanx.ts +23 -0
- package/src/commands/game/planet.ts +78 -0
- package/src/commands/game/playerCard.ts +20 -0
- package/src/commands/game/questions.ts +23 -0
- package/src/commands/game/records.ts +16 -0
- package/src/commands/game/reduceFleet.ts +41 -0
- package/src/commands/game/reduceResources.ts +35 -0
- package/src/commands/game/research.ts +80 -0
- package/src/commands/game/resources.ts +49 -0
- package/src/commands/game/scan.ts +12 -0
- package/src/commands/game/search.ts +44 -0
- package/src/commands/game/settings.ts +121 -0
- package/src/commands/game/shipyard.ts +61 -0
- package/src/commands/game/shops.ts +89 -0
- package/src/commands/game/statistics.ts +22 -0
- package/src/commands/game/store.ts +12 -0
- package/src/commands/game/techtree.ts +16 -0
- package/src/commands/game/ticket.ts +44 -0
- package/src/commands/game/trader.ts +51 -0
- package/src/commands/game/workflows/fleet.ts +12 -0
- package/src/commands/game/workflows/snapshot.ts +84 -0
- package/src/commands/game/workflows/social.ts +37 -0
- package/src/commands/http/get.ts +13 -0
- package/src/commands/http/post.ts +44 -0
- package/src/commands/public/banList.ts +21 -0
- package/src/commands/public/battleHall.ts +20 -0
- package/src/commands/public/battleReport.ts +20 -0
- package/src/commands/public/board.ts +20 -0
- package/src/commands/public/disclaimer.ts +20 -0
- package/src/commands/public/externalAuth.ts +17 -0
- package/src/commands/public/index.ts +22 -0
- package/src/commands/public/login.ts +20 -0
- package/src/commands/public/lostPassword.ts +57 -0
- package/src/commands/public/news.ts +20 -0
- package/src/commands/public/register.ts +46 -0
- package/src/commands/public/rules.ts +20 -0
- package/src/commands/public/screens.ts +20 -0
- package/src/commands/public/verify.ts +38 -0
- package/src/commands/rules/new-star.ts +221 -0
- package/src/commands/rules/production.ts +51 -0
- package/src/completion/BifrostCompletion.psm1 +47 -0
- package/src/completion.ts +445 -0
- package/src/connection.ts +106 -0
- package/src/destination.ts +64 -0
- package/src/game.ts +978 -0
- package/src/help.ts +203 -0
- package/src/i18n.ts +45 -0
- package/src/index.ts +2 -0
- package/src/input/admin/accountEditor.ts +156 -0
- package/src/input/admin/ban.ts +23 -0
- package/src/input/admin/create.ts +36 -0
- package/src/input/admin/cronjob.ts +22 -0
- package/src/input/admin/fields.ts +432 -0
- package/src/input/admin/login.ts +9 -0
- package/src/input/admin/messageList.ts +21 -0
- package/src/input/admin/news.ts +29 -0
- package/src/input/admin/quickEditor.ts +115 -0
- package/src/input/admin/records.ts +68 -0
- package/src/input/admin/reset.ts +29 -0
- package/src/input/admin/search.ts +23 -0
- package/src/input/admin/sendMessages.ts +21 -0
- package/src/input/admin/universeSettings.ts +46 -0
- package/src/input/files.ts +65 -0
- package/src/input/game/allianceAdmin.ts +55 -0
- package/src/input/game/battleSimulator.ts +25 -0
- package/src/input/game/fleetStep1.ts +14 -0
- package/src/input/game/settings.ts +46 -0
- package/src/input/game/ticket.ts +16 -0
- package/src/input/parse.ts +173 -0
- package/src/input/paths.ts +392 -0
- package/src/input/protocol/context.ts +10 -0
- package/src/input/protocol/missions.ts +6 -0
- package/src/input/protocol/routes.ts +15 -0
- package/src/input/protocol/settings.ts +126 -0
- package/src/input/protocol/values.ts +13 -0
- package/src/input/public/externalAuth.ts +26 -0
- package/src/input/public/register.ts +9 -0
- package/src/input/rules/new-star.ts +21 -0
- package/src/input/rules/production.ts +14 -0
- package/src/input/shared.ts +51 -0
- package/src/input/spec.ts +155 -0
- package/src/input/values.ts +114 -0
- package/src/input/workflows/fleet.ts +22 -0
- package/src/input/workflows/snapshot.ts +74 -0
- package/src/locales/en-US/commands.ts +377 -0
- package/src/locales/en-US/diagnostics.ts +89 -0
- package/src/locales/en-US.ts +61 -0
- package/src/locales/zh-CN/commands.ts +307 -0
- package/src/locales/zh-CN/diagnostics.ts +81 -0
- package/src/locales/zh-CN.ts +57 -0
- package/src/options.ts +48 -0
- package/src/output.ts +201 -0
- package/src/pointer.ts +46 -0
- package/src/presentation.ts +96 -0
- package/src/public.ts +99 -0
- package/src/registry.ts +67 -0
- package/src/requests.ts +13 -0
- package/src/result.ts +27 -0
- package/src/rules.ts +77 -0
- package/src/runner.ts +214 -0
- package/src/selection.ts +44 -0
- package/src/terminal.ts +27 -0
- package/src/types.ts +110 -0
- package/src/version.ts +11 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { adminNews, adminNewsDelete, adminNewsSave } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { adminNewsDraftInput, adminNewsReadInput } from '../../input/admin/news.ts'
|
|
5
|
+
import { numberInput, required } from '../../input/spec.ts'
|
|
6
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
7
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
8
|
+
|
|
9
|
+
const adminNewsSchema = adminNewsReadInput satisfies InputSpec<Parameters<typeof adminNews>[1]>
|
|
10
|
+
|
|
11
|
+
const adminNewsDeleteSchema = {
|
|
12
|
+
kind: 'object',
|
|
13
|
+
fields: { newsId: required(numberInput) },
|
|
14
|
+
} satisfies InputSpec<Parameters<typeof adminNewsDelete>[1]>
|
|
15
|
+
|
|
16
|
+
const adminNewsSaveSchema = {
|
|
17
|
+
kind: 'object',
|
|
18
|
+
fields: { draft: required(adminNewsDraftInput) },
|
|
19
|
+
} satisfies InputSpec<Parameters<typeof adminNewsSave>[1]>
|
|
20
|
+
|
|
21
|
+
export const adminNewsCommand: NetworkCommand = observedCommand(
|
|
22
|
+
'admin',
|
|
23
|
+
'adminNews',
|
|
24
|
+
adminNewsSchema,
|
|
25
|
+
adminNews,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
export const adminNewsDeleteCommand: NetworkCommand = observedCommand(
|
|
29
|
+
'admin',
|
|
30
|
+
'adminNewsDelete',
|
|
31
|
+
adminNewsDeleteSchema,
|
|
32
|
+
adminNewsDelete,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
export const adminNewsSaveCommand: NetworkCommand = observedCommand(
|
|
36
|
+
'admin',
|
|
37
|
+
'adminNewsSave',
|
|
38
|
+
adminNewsSaveSchema,
|
|
39
|
+
adminNewsSave,
|
|
40
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { adminOverview } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { emptyInput } from '../../input/spec.ts'
|
|
5
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
6
|
+
|
|
7
|
+
export const adminOverviewCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
8
|
+
'admin',
|
|
9
|
+
'adminOverview',
|
|
10
|
+
emptyInput,
|
|
11
|
+
(session) => adminOverview(session),
|
|
12
|
+
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { adminPassword } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { optional, stringInput } from '../../input/spec.ts'
|
|
5
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
6
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
7
|
+
|
|
8
|
+
const adminPasswordSchema = {
|
|
9
|
+
kind: 'object',
|
|
10
|
+
fields: { text: optional(stringInput) },
|
|
11
|
+
} satisfies InputSpec<Parameters<typeof adminPassword>[1]>
|
|
12
|
+
|
|
13
|
+
export const adminPasswordCommand: NetworkCommand = observedCommand(
|
|
14
|
+
'admin',
|
|
15
|
+
'adminPassword',
|
|
16
|
+
adminPasswordSchema,
|
|
17
|
+
adminPassword,
|
|
18
|
+
)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { adminQuickEditor, adminQuickEditorSave } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import {
|
|
5
|
+
adminQuickEditorTargetInput,
|
|
6
|
+
adminQuickEditorSaveInput,
|
|
7
|
+
} from '../../input/admin/quickEditor.ts'
|
|
8
|
+
import { numberInput, required } from '../../input/spec.ts'
|
|
9
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
10
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
11
|
+
|
|
12
|
+
const adminQuickEditorSchema = {
|
|
13
|
+
kind: 'object',
|
|
14
|
+
fields: { editor: required(adminQuickEditorTargetInput), recordId: required(numberInput) },
|
|
15
|
+
} satisfies InputSpec<Parameters<typeof adminQuickEditor>[1]>
|
|
16
|
+
|
|
17
|
+
const adminQuickEditorSaveSchema = adminQuickEditorSaveInput satisfies InputSpec<
|
|
18
|
+
Parameters<typeof adminQuickEditorSave>[1]
|
|
19
|
+
>
|
|
20
|
+
|
|
21
|
+
export const adminQuickEditorCommand: NetworkCommand = observedCommand<
|
|
22
|
+
Parameters<typeof adminQuickEditor>[1]
|
|
23
|
+
>('admin', 'adminQuickEditor', adminQuickEditorSchema, adminQuickEditor)
|
|
24
|
+
|
|
25
|
+
export const adminQuickEditorSaveCommand: NetworkCommand = observedCommand(
|
|
26
|
+
'admin',
|
|
27
|
+
'adminQuickEditorSave',
|
|
28
|
+
adminQuickEditorSaveSchema,
|
|
29
|
+
adminQuickEditorSave,
|
|
30
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { adminRefreshStatistics } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { emptyInput } from '../../input/spec.ts'
|
|
5
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
6
|
+
|
|
7
|
+
export const adminRefreshStatisticsCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
8
|
+
'admin',
|
|
9
|
+
'adminRefreshStatistics',
|
|
10
|
+
emptyInput,
|
|
11
|
+
(session) => adminRefreshStatistics(session),
|
|
12
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { adminReset, adminResetUniverse } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { adminResetTargetInput } from '../../input/admin/reset.ts'
|
|
5
|
+
import { arrayInput, emptyInput, required } from '../../input/spec.ts'
|
|
6
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
7
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
8
|
+
|
|
9
|
+
const adminResetUniverseSchema = {
|
|
10
|
+
kind: 'object',
|
|
11
|
+
fields: { targets: required(arrayInput(adminResetTargetInput)) },
|
|
12
|
+
} satisfies InputSpec<Parameters<typeof adminResetUniverse>[1]>
|
|
13
|
+
|
|
14
|
+
export const adminResetCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
15
|
+
'admin',
|
|
16
|
+
'adminReset',
|
|
17
|
+
emptyInput,
|
|
18
|
+
(session) => adminReset(session),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export const adminResetUniverseCommand: NetworkCommand = observedCommand(
|
|
22
|
+
'admin',
|
|
23
|
+
'adminResetUniverse',
|
|
24
|
+
adminResetUniverseSchema,
|
|
25
|
+
adminResetUniverse,
|
|
26
|
+
)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
adminRights,
|
|
3
|
+
adminRightsLookup,
|
|
4
|
+
adminRightsSave,
|
|
5
|
+
adminRightsSetLevel,
|
|
6
|
+
} from '@senators/bifrost'
|
|
7
|
+
import type { AdminRightKey } from '@senators/bifrost'
|
|
8
|
+
|
|
9
|
+
import { observedCommand } from '../../catalog.ts'
|
|
10
|
+
import { adminRightFields } from '../../input/admin/fields.ts'
|
|
11
|
+
import { adminPatchInput } from '../../input/admin/records.ts'
|
|
12
|
+
import { booleanInput, enumeration, numberInput, optional, required } from '../../input/spec.ts'
|
|
13
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
14
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
15
|
+
|
|
16
|
+
const adminRightsSchema = {
|
|
17
|
+
kind: 'object',
|
|
18
|
+
fields: {
|
|
19
|
+
group: optional(enumeration(['administrator', 'operator', 'moderator', 'player'])),
|
|
20
|
+
section: optional(enumeration(['rights', 'users'])),
|
|
21
|
+
},
|
|
22
|
+
} satisfies InputSpec<Parameters<typeof adminRights>[1]>
|
|
23
|
+
|
|
24
|
+
const adminRightsLookupSchema = {
|
|
25
|
+
kind: 'object',
|
|
26
|
+
fields: { playerId: required(numberInput) },
|
|
27
|
+
} satisfies InputSpec<Parameters<typeof adminRightsLookup>[1]>
|
|
28
|
+
|
|
29
|
+
const adminRightsSaveSchema = {
|
|
30
|
+
kind: 'object',
|
|
31
|
+
fields: {
|
|
32
|
+
grants: required(adminPatchInput<AdminRightKey, boolean>(adminRightFields, booleanInput)),
|
|
33
|
+
playerId: required(numberInput),
|
|
34
|
+
},
|
|
35
|
+
} satisfies InputSpec<Parameters<typeof adminRightsSave>[1]>
|
|
36
|
+
|
|
37
|
+
const adminRightsSetLevelSchema = {
|
|
38
|
+
kind: 'object',
|
|
39
|
+
fields: { level: required(numberInput), playerId: required(numberInput) },
|
|
40
|
+
} satisfies InputSpec<Parameters<typeof adminRightsSetLevel>[1]>
|
|
41
|
+
|
|
42
|
+
export const adminRightsCommand: NetworkCommand = observedCommand(
|
|
43
|
+
'admin',
|
|
44
|
+
'adminRights',
|
|
45
|
+
adminRightsSchema,
|
|
46
|
+
adminRights,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
export const adminRightsLookupCommand: NetworkCommand = observedCommand(
|
|
50
|
+
'admin',
|
|
51
|
+
'adminRightsLookup',
|
|
52
|
+
adminRightsLookupSchema,
|
|
53
|
+
adminRightsLookup,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
export const adminRightsSaveCommand: NetworkCommand = observedCommand(
|
|
57
|
+
'admin',
|
|
58
|
+
'adminRightsSave',
|
|
59
|
+
adminRightsSaveSchema,
|
|
60
|
+
adminRightsSave,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
export const adminRightsSetLevelCommand: NetworkCommand = observedCommand(
|
|
64
|
+
'admin',
|
|
65
|
+
'adminRightsSetLevel',
|
|
66
|
+
adminRightsSetLevelSchema,
|
|
67
|
+
adminRightsSetLevel,
|
|
68
|
+
)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { adminSearch, adminSearchDelete } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { adminSearchRequestInput, adminSearchTargetInput } from '../../input/admin/search.ts'
|
|
5
|
+
import { required } from '../../input/spec.ts'
|
|
6
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
7
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
8
|
+
|
|
9
|
+
const adminSearchSchema = {
|
|
10
|
+
kind: 'object',
|
|
11
|
+
fields: { request: required(adminSearchRequestInput) },
|
|
12
|
+
} satisfies InputSpec<Parameters<typeof adminSearch>[1]>
|
|
13
|
+
|
|
14
|
+
const adminSearchDeleteSchema = {
|
|
15
|
+
kind: 'object',
|
|
16
|
+
fields: { request: required(adminSearchRequestInput), target: required(adminSearchTargetInput) },
|
|
17
|
+
} satisfies InputSpec<Parameters<typeof adminSearchDelete>[1]>
|
|
18
|
+
|
|
19
|
+
export const adminSearchCommand: NetworkCommand = observedCommand(
|
|
20
|
+
'admin',
|
|
21
|
+
'adminSearch',
|
|
22
|
+
adminSearchSchema,
|
|
23
|
+
adminSearch,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
export const adminSearchDeleteCommand: NetworkCommand = observedCommand(
|
|
27
|
+
'admin',
|
|
28
|
+
'adminSearchDelete',
|
|
29
|
+
adminSearchDeleteSchema,
|
|
30
|
+
adminSearchDelete,
|
|
31
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { adminSendMessages, adminSendMessagesSend } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { adminBroadcastInput } from '../../input/admin/sendMessages.ts'
|
|
5
|
+
import { emptyInput, required } from '../../input/spec.ts'
|
|
6
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
7
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
8
|
+
|
|
9
|
+
const adminSendMessagesSendSchema = {
|
|
10
|
+
kind: 'object',
|
|
11
|
+
fields: { broadcast: required(adminBroadcastInput) },
|
|
12
|
+
} satisfies InputSpec<Parameters<typeof adminSendMessagesSend>[1]>
|
|
13
|
+
|
|
14
|
+
export const adminSendMessagesCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
15
|
+
'admin',
|
|
16
|
+
'adminSendMessages',
|
|
17
|
+
emptyInput,
|
|
18
|
+
(session) => adminSendMessages(session),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export const adminSendMessagesSendCommand: NetworkCommand = observedCommand(
|
|
22
|
+
'admin',
|
|
23
|
+
'adminSendMessagesSend',
|
|
24
|
+
adminSendMessagesSendSchema,
|
|
25
|
+
adminSendMessagesSend,
|
|
26
|
+
)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { adminSupport, adminSupportSend, adminSupportView } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import {
|
|
5
|
+
booleanInput,
|
|
6
|
+
emptyInput,
|
|
7
|
+
numberInput,
|
|
8
|
+
optional,
|
|
9
|
+
required,
|
|
10
|
+
stringInput,
|
|
11
|
+
} from '../../input/spec.ts'
|
|
12
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
13
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
14
|
+
|
|
15
|
+
const adminSupportSendSchema = {
|
|
16
|
+
kind: 'object',
|
|
17
|
+
fields: {
|
|
18
|
+
changeStatus: optional(booleanInput),
|
|
19
|
+
text: optional(stringInput),
|
|
20
|
+
ticketId: required(numberInput),
|
|
21
|
+
},
|
|
22
|
+
} satisfies InputSpec<Parameters<typeof adminSupportSend>[1]>
|
|
23
|
+
|
|
24
|
+
const adminSupportViewSchema = {
|
|
25
|
+
kind: 'object',
|
|
26
|
+
fields: { ticketId: required(numberInput) },
|
|
27
|
+
} satisfies InputSpec<Parameters<typeof adminSupportView>[1]>
|
|
28
|
+
|
|
29
|
+
export const adminSupportCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
30
|
+
'admin',
|
|
31
|
+
'adminSupport',
|
|
32
|
+
emptyInput,
|
|
33
|
+
(session) => adminSupport(session),
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
export const adminSupportSendCommand: NetworkCommand = observedCommand(
|
|
37
|
+
'admin',
|
|
38
|
+
'adminSupportSend',
|
|
39
|
+
adminSupportSendSchema,
|
|
40
|
+
adminSupportSend,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
export const adminSupportViewCommand: NetworkCommand = observedCommand(
|
|
44
|
+
'admin',
|
|
45
|
+
'adminSupportView',
|
|
46
|
+
adminSupportViewSchema,
|
|
47
|
+
adminSupportView,
|
|
48
|
+
)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
adminUniverse,
|
|
3
|
+
adminUniverseCreate,
|
|
4
|
+
adminUniverseDelete,
|
|
5
|
+
adminUniverseOpen,
|
|
6
|
+
} from '@senators/bifrost'
|
|
7
|
+
|
|
8
|
+
import { observedCommand } from '../../catalog.ts'
|
|
9
|
+
import { booleanInput, emptyInput, numberInput, required } from '../../input/spec.ts'
|
|
10
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
11
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
12
|
+
|
|
13
|
+
const adminUniverseDeleteSchema = {
|
|
14
|
+
kind: 'object',
|
|
15
|
+
fields: { universeId: required(numberInput) },
|
|
16
|
+
} satisfies InputSpec<Parameters<typeof adminUniverseDelete>[1]>
|
|
17
|
+
|
|
18
|
+
const adminUniverseOpenSchema = {
|
|
19
|
+
kind: 'object',
|
|
20
|
+
fields: { open: required(booleanInput), universeId: required(numberInput) },
|
|
21
|
+
} satisfies InputSpec<Parameters<typeof adminUniverseOpen>[1]>
|
|
22
|
+
|
|
23
|
+
export const adminUniverseCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
24
|
+
'admin',
|
|
25
|
+
'adminUniverse',
|
|
26
|
+
emptyInput,
|
|
27
|
+
(session) => adminUniverse(session),
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
export const adminUniverseCreateCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
31
|
+
'admin',
|
|
32
|
+
'adminUniverseCreate',
|
|
33
|
+
emptyInput,
|
|
34
|
+
(session) => adminUniverseCreate(session),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
export const adminUniverseDeleteCommand: NetworkCommand = observedCommand(
|
|
38
|
+
'admin',
|
|
39
|
+
'adminUniverseDelete',
|
|
40
|
+
adminUniverseDeleteSchema,
|
|
41
|
+
adminUniverseDelete,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
export const adminUniverseOpenCommand: NetworkCommand = observedCommand(
|
|
45
|
+
'admin',
|
|
46
|
+
'adminUniverseOpen',
|
|
47
|
+
adminUniverseOpenSchema,
|
|
48
|
+
adminUniverseOpen,
|
|
49
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { adminUniverseSettings, adminUniverseSettingsSave } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import {
|
|
5
|
+
adminUniverseSettingsPageInput,
|
|
6
|
+
adminUniverseSettingsPatchInput,
|
|
7
|
+
} from '../../input/admin/universeSettings.ts'
|
|
8
|
+
import { emptyInput, required } from '../../input/spec.ts'
|
|
9
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
10
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
11
|
+
|
|
12
|
+
const adminUniverseSettingsSaveSchema = {
|
|
13
|
+
kind: 'object',
|
|
14
|
+
fields: {
|
|
15
|
+
form: required(adminUniverseSettingsPageInput),
|
|
16
|
+
patch: required(adminUniverseSettingsPatchInput),
|
|
17
|
+
},
|
|
18
|
+
} satisfies InputSpec<Parameters<typeof adminUniverseSettingsSave>[1]>
|
|
19
|
+
|
|
20
|
+
export const adminUniverseSettingsCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
21
|
+
'admin',
|
|
22
|
+
'adminUniverseSettings',
|
|
23
|
+
emptyInput,
|
|
24
|
+
(session) => adminUniverseSettings(session),
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
export const adminUniverseSettingsSaveCommand: NetworkCommand = observedCommand(
|
|
28
|
+
'admin',
|
|
29
|
+
'adminUniverseSettingsSave',
|
|
30
|
+
adminUniverseSettingsSaveSchema,
|
|
31
|
+
adminUniverseSettingsSave,
|
|
32
|
+
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { achievements } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { planetReferenceInput } from '../../input/shared.ts'
|
|
5
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
6
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
7
|
+
|
|
8
|
+
const achievementsSchema = planetReferenceInput satisfies InputSpec<
|
|
9
|
+
Parameters<typeof achievements>[1]
|
|
10
|
+
>
|
|
11
|
+
|
|
12
|
+
export const achievementsCommand: NetworkCommand = observedCommand(
|
|
13
|
+
'game',
|
|
14
|
+
'achievements',
|
|
15
|
+
achievementsSchema,
|
|
16
|
+
achievements,
|
|
17
|
+
'planetId',
|
|
18
|
+
)
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import {
|
|
2
|
+
alliance,
|
|
3
|
+
allianceApply,
|
|
4
|
+
cancelAllianceApplication,
|
|
5
|
+
allianceCircular,
|
|
6
|
+
allianceCreate,
|
|
7
|
+
createAlliance,
|
|
8
|
+
allianceDeposit,
|
|
9
|
+
depositAllianceResources,
|
|
10
|
+
allianceDevelopment,
|
|
11
|
+
distributeAllianceResources,
|
|
12
|
+
allianceInfo,
|
|
13
|
+
allianceIssue,
|
|
14
|
+
leaveAlliance,
|
|
15
|
+
allianceMemberList,
|
|
16
|
+
sendAllianceCircular,
|
|
17
|
+
allianceStorage,
|
|
18
|
+
submitAllianceApplication,
|
|
19
|
+
upgradeAllianceDevelopment,
|
|
20
|
+
withdrawAllianceResources,
|
|
21
|
+
allianceWithdrawal,
|
|
22
|
+
} from '@senators/bifrost'
|
|
23
|
+
|
|
24
|
+
import { observedCommand } from '../../catalog.ts'
|
|
25
|
+
import { elementInput, planetReferenceInput } from '../../input/shared.ts'
|
|
26
|
+
import { emptyInput, numberInput, optional, required, stringInput } from '../../input/spec.ts'
|
|
27
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
28
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
29
|
+
|
|
30
|
+
const allianceApplySchema = {
|
|
31
|
+
kind: 'object',
|
|
32
|
+
fields: {
|
|
33
|
+
allianceId: required(numberInput),
|
|
34
|
+
},
|
|
35
|
+
} satisfies InputSpec<Parameters<typeof allianceApply>[1]>
|
|
36
|
+
|
|
37
|
+
const createAllianceSchema = {
|
|
38
|
+
kind: 'object',
|
|
39
|
+
fields: {
|
|
40
|
+
name: required(stringInput),
|
|
41
|
+
tag: required(stringInput),
|
|
42
|
+
},
|
|
43
|
+
} satisfies InputSpec<Parameters<typeof createAlliance>[1]>
|
|
44
|
+
|
|
45
|
+
const allianceDepositSchema = planetReferenceInput satisfies InputSpec<
|
|
46
|
+
Parameters<typeof allianceDeposit>[1]
|
|
47
|
+
>
|
|
48
|
+
|
|
49
|
+
const depositAllianceResourcesSchema = {
|
|
50
|
+
kind: 'object',
|
|
51
|
+
fields: {
|
|
52
|
+
planetId: required(numberInput),
|
|
53
|
+
resources: required(elementInput),
|
|
54
|
+
},
|
|
55
|
+
} satisfies InputSpec<Parameters<typeof depositAllianceResources>[1]>
|
|
56
|
+
|
|
57
|
+
const distributeAllianceResourcesSchema = {
|
|
58
|
+
kind: 'object',
|
|
59
|
+
fields: {
|
|
60
|
+
resources: required(elementInput),
|
|
61
|
+
target: required(planetReferenceInput),
|
|
62
|
+
},
|
|
63
|
+
} satisfies InputSpec<Parameters<typeof distributeAllianceResources>[1]>
|
|
64
|
+
|
|
65
|
+
const allianceInfoSchema = {
|
|
66
|
+
kind: 'object',
|
|
67
|
+
fields: {
|
|
68
|
+
allianceId: required(numberInput),
|
|
69
|
+
},
|
|
70
|
+
} satisfies InputSpec<Parameters<typeof allianceInfo>[1]>
|
|
71
|
+
|
|
72
|
+
const sendAllianceCircularSchema = {
|
|
73
|
+
kind: 'object',
|
|
74
|
+
fields: {
|
|
75
|
+
message: required(stringInput),
|
|
76
|
+
rankId: optional(numberInput),
|
|
77
|
+
subject: required(stringInput),
|
|
78
|
+
},
|
|
79
|
+
} satisfies InputSpec<Parameters<typeof sendAllianceCircular>[1]>
|
|
80
|
+
|
|
81
|
+
const submitAllianceApplicationSchema = {
|
|
82
|
+
kind: 'object',
|
|
83
|
+
fields: {
|
|
84
|
+
allianceId: required(numberInput),
|
|
85
|
+
message: required(stringInput),
|
|
86
|
+
},
|
|
87
|
+
} satisfies InputSpec<Parameters<typeof submitAllianceApplication>[1]>
|
|
88
|
+
|
|
89
|
+
const upgradeAllianceDevelopmentSchema = {
|
|
90
|
+
kind: 'object',
|
|
91
|
+
fields: {
|
|
92
|
+
elementId: required(numberInput),
|
|
93
|
+
levels: required(numberInput),
|
|
94
|
+
},
|
|
95
|
+
} satisfies InputSpec<Parameters<typeof upgradeAllianceDevelopment>[1]>
|
|
96
|
+
|
|
97
|
+
const withdrawAllianceResourcesSchema = {
|
|
98
|
+
kind: 'object',
|
|
99
|
+
fields: {
|
|
100
|
+
planetId: required(numberInput),
|
|
101
|
+
resources: required(elementInput),
|
|
102
|
+
},
|
|
103
|
+
} satisfies InputSpec<Parameters<typeof withdrawAllianceResources>[1]>
|
|
104
|
+
|
|
105
|
+
const allianceWithdrawalSchema = planetReferenceInput satisfies InputSpec<
|
|
106
|
+
Parameters<typeof allianceWithdrawal>[1]
|
|
107
|
+
>
|
|
108
|
+
|
|
109
|
+
export const allianceCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
110
|
+
'game',
|
|
111
|
+
'alliance',
|
|
112
|
+
emptyInput,
|
|
113
|
+
(session) => alliance(session),
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
export const allianceApplyCommand: NetworkCommand = observedCommand(
|
|
117
|
+
'game',
|
|
118
|
+
'allianceApply',
|
|
119
|
+
allianceApplySchema,
|
|
120
|
+
allianceApply,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
export const cancelAllianceApplicationCommand: NetworkCommand = observedCommand<
|
|
124
|
+
Record<string, never>
|
|
125
|
+
>('game', 'cancelAllianceApplication', emptyInput, (session) => cancelAllianceApplication(session))
|
|
126
|
+
|
|
127
|
+
export const allianceCircularCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
128
|
+
'game',
|
|
129
|
+
'allianceCircular',
|
|
130
|
+
emptyInput,
|
|
131
|
+
(session) => allianceCircular(session),
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
export const allianceCreateCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
135
|
+
'game',
|
|
136
|
+
'allianceCreate',
|
|
137
|
+
emptyInput,
|
|
138
|
+
(session) => allianceCreate(session),
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
export const createAllianceCommand: NetworkCommand = observedCommand(
|
|
142
|
+
'game',
|
|
143
|
+
'createAlliance',
|
|
144
|
+
createAllianceSchema,
|
|
145
|
+
createAlliance,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
export const allianceDepositCommand: NetworkCommand = observedCommand(
|
|
149
|
+
'game',
|
|
150
|
+
'allianceDeposit',
|
|
151
|
+
allianceDepositSchema,
|
|
152
|
+
allianceDeposit,
|
|
153
|
+
'planetId',
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
export const depositAllianceResourcesCommand: NetworkCommand = observedCommand(
|
|
157
|
+
'game',
|
|
158
|
+
'depositAllianceResources',
|
|
159
|
+
depositAllianceResourcesSchema,
|
|
160
|
+
depositAllianceResources,
|
|
161
|
+
'planetId',
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
export const allianceDevelopmentCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
165
|
+
'game',
|
|
166
|
+
'allianceDevelopment',
|
|
167
|
+
emptyInput,
|
|
168
|
+
(session) => allianceDevelopment(session),
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
export const distributeAllianceResourcesCommand: NetworkCommand = observedCommand(
|
|
172
|
+
'game',
|
|
173
|
+
'distributeAllianceResources',
|
|
174
|
+
distributeAllianceResourcesSchema,
|
|
175
|
+
distributeAllianceResources,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
export const allianceInfoCommand: NetworkCommand = observedCommand(
|
|
179
|
+
'game',
|
|
180
|
+
'allianceInfo',
|
|
181
|
+
allianceInfoSchema,
|
|
182
|
+
allianceInfo,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
export const allianceIssueCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
186
|
+
'game',
|
|
187
|
+
'allianceIssue',
|
|
188
|
+
emptyInput,
|
|
189
|
+
(session) => allianceIssue(session),
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
export const leaveAllianceCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
193
|
+
'game',
|
|
194
|
+
'leaveAlliance',
|
|
195
|
+
emptyInput,
|
|
196
|
+
(session) => leaveAlliance(session),
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
export const allianceMemberListCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
200
|
+
'game',
|
|
201
|
+
'allianceMemberList',
|
|
202
|
+
emptyInput,
|
|
203
|
+
(session) => allianceMemberList(session),
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
export const sendAllianceCircularCommand: NetworkCommand = observedCommand(
|
|
207
|
+
'game',
|
|
208
|
+
'sendAllianceCircular',
|
|
209
|
+
sendAllianceCircularSchema,
|
|
210
|
+
sendAllianceCircular,
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
export const allianceStorageCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
214
|
+
'game',
|
|
215
|
+
'allianceStorage',
|
|
216
|
+
emptyInput,
|
|
217
|
+
(session) => allianceStorage(session),
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
export const submitAllianceApplicationCommand: NetworkCommand = observedCommand(
|
|
221
|
+
'game',
|
|
222
|
+
'submitAllianceApplication',
|
|
223
|
+
submitAllianceApplicationSchema,
|
|
224
|
+
submitAllianceApplication,
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
export const upgradeAllianceDevelopmentCommand: NetworkCommand = observedCommand(
|
|
228
|
+
'game',
|
|
229
|
+
'upgradeAllianceDevelopment',
|
|
230
|
+
upgradeAllianceDevelopmentSchema,
|
|
231
|
+
upgradeAllianceDevelopment,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
export const withdrawAllianceResourcesCommand: NetworkCommand = observedCommand(
|
|
235
|
+
'game',
|
|
236
|
+
'withdrawAllianceResources',
|
|
237
|
+
withdrawAllianceResourcesSchema,
|
|
238
|
+
withdrawAllianceResources,
|
|
239
|
+
'planetId',
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
export const allianceWithdrawalCommand: NetworkCommand = observedCommand(
|
|
243
|
+
'game',
|
|
244
|
+
'allianceWithdrawal',
|
|
245
|
+
allianceWithdrawalSchema,
|
|
246
|
+
allianceWithdrawal,
|
|
247
|
+
'planetId',
|
|
248
|
+
)
|