@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,236 @@
|
|
|
1
|
+
import {
|
|
2
|
+
acceptAllianceDiplomacy,
|
|
3
|
+
answerAllianceApplication,
|
|
4
|
+
changeAllianceRank,
|
|
5
|
+
createAllianceDiplomacy,
|
|
6
|
+
deleteAllianceDiplomacy,
|
|
7
|
+
allianceAdminDetailApply,
|
|
8
|
+
allianceAdminDiplomacy,
|
|
9
|
+
allianceAdminDiplomacyCreate,
|
|
10
|
+
dissolveAlliance,
|
|
11
|
+
kickAllianceMember,
|
|
12
|
+
allianceAdminManageApply,
|
|
13
|
+
allianceAdminMembers,
|
|
14
|
+
allianceAdminOverview,
|
|
15
|
+
allianceAdminPermissions,
|
|
16
|
+
setAllianceMemberRank,
|
|
17
|
+
allianceAdminTransfer,
|
|
18
|
+
transferAllianceLeadership,
|
|
19
|
+
updateAllianceSettings,
|
|
20
|
+
} from '@senators/bifrost'
|
|
21
|
+
|
|
22
|
+
import { observedCommand } from '../../catalog.ts'
|
|
23
|
+
import {
|
|
24
|
+
allianceAdminOverviewInput,
|
|
25
|
+
allianceRankChangeInput,
|
|
26
|
+
} from '../../input/game/allianceAdmin.ts'
|
|
27
|
+
import { allianceSettingsPatchInput, allianceTextKindInput } from '../../input/protocol/settings.ts'
|
|
28
|
+
import {
|
|
29
|
+
booleanInput,
|
|
30
|
+
emptyInput,
|
|
31
|
+
numberInput,
|
|
32
|
+
optional,
|
|
33
|
+
required,
|
|
34
|
+
stringInput,
|
|
35
|
+
} from '../../input/spec.ts'
|
|
36
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
37
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
38
|
+
|
|
39
|
+
const acceptAllianceDiplomacySchema = {
|
|
40
|
+
kind: 'object',
|
|
41
|
+
fields: {
|
|
42
|
+
diplomacyId: required(numberInput),
|
|
43
|
+
},
|
|
44
|
+
} satisfies InputSpec<Parameters<typeof acceptAllianceDiplomacy>[1]>
|
|
45
|
+
|
|
46
|
+
const answerAllianceApplicationSchema = {
|
|
47
|
+
kind: 'object',
|
|
48
|
+
fields: {
|
|
49
|
+
accept: required(booleanInput),
|
|
50
|
+
applicationId: required(numberInput),
|
|
51
|
+
text: optional(stringInput),
|
|
52
|
+
},
|
|
53
|
+
} satisfies InputSpec<Parameters<typeof answerAllianceApplication>[1]>
|
|
54
|
+
|
|
55
|
+
const changeAllianceRankSchema = allianceRankChangeInput satisfies InputSpec<
|
|
56
|
+
Parameters<typeof changeAllianceRank>[1]
|
|
57
|
+
>
|
|
58
|
+
|
|
59
|
+
const createAllianceDiplomacySchema = {
|
|
60
|
+
kind: 'object',
|
|
61
|
+
fields: {
|
|
62
|
+
allianceId: required(numberInput),
|
|
63
|
+
level: required(numberInput),
|
|
64
|
+
message: required(stringInput),
|
|
65
|
+
},
|
|
66
|
+
} satisfies InputSpec<Parameters<typeof createAllianceDiplomacy>[1]>
|
|
67
|
+
|
|
68
|
+
const deleteAllianceDiplomacySchema = {
|
|
69
|
+
kind: 'object',
|
|
70
|
+
fields: {
|
|
71
|
+
diplomacyId: required(numberInput),
|
|
72
|
+
},
|
|
73
|
+
} satisfies InputSpec<Parameters<typeof deleteAllianceDiplomacy>[1]>
|
|
74
|
+
|
|
75
|
+
const allianceAdminDetailApplySchema = {
|
|
76
|
+
kind: 'object',
|
|
77
|
+
fields: {
|
|
78
|
+
applicationId: required(numberInput),
|
|
79
|
+
},
|
|
80
|
+
} satisfies InputSpec<Parameters<typeof allianceAdminDetailApply>[1]>
|
|
81
|
+
|
|
82
|
+
const kickAllianceMemberSchema = {
|
|
83
|
+
kind: 'object',
|
|
84
|
+
fields: {
|
|
85
|
+
playerId: required(numberInput),
|
|
86
|
+
},
|
|
87
|
+
} satisfies InputSpec<Parameters<typeof kickAllianceMember>[1]>
|
|
88
|
+
|
|
89
|
+
const allianceAdminOverviewSchema = {
|
|
90
|
+
kind: 'object',
|
|
91
|
+
fields: {
|
|
92
|
+
textKind: optional(allianceTextKindInput),
|
|
93
|
+
},
|
|
94
|
+
} satisfies InputSpec<Parameters<typeof allianceAdminOverview>[1]>
|
|
95
|
+
|
|
96
|
+
const setAllianceMemberRankSchema = {
|
|
97
|
+
kind: 'object',
|
|
98
|
+
fields: {
|
|
99
|
+
playerId: required(numberInput),
|
|
100
|
+
rankId: required(numberInput),
|
|
101
|
+
},
|
|
102
|
+
} satisfies InputSpec<Parameters<typeof setAllianceMemberRank>[1]>
|
|
103
|
+
|
|
104
|
+
const transferAllianceLeadershipSchema = {
|
|
105
|
+
kind: 'object',
|
|
106
|
+
fields: {
|
|
107
|
+
playerId: required(numberInput),
|
|
108
|
+
},
|
|
109
|
+
} satisfies InputSpec<Parameters<typeof transferAllianceLeadership>[1]>
|
|
110
|
+
|
|
111
|
+
const updateAllianceSettingsSchema = {
|
|
112
|
+
kind: 'object',
|
|
113
|
+
fields: {
|
|
114
|
+
form: required(allianceAdminOverviewInput),
|
|
115
|
+
patch: required(allianceSettingsPatchInput),
|
|
116
|
+
},
|
|
117
|
+
} satisfies InputSpec<Parameters<typeof updateAllianceSettings>[1]>
|
|
118
|
+
|
|
119
|
+
export const acceptAllianceDiplomacyCommand: NetworkCommand = observedCommand(
|
|
120
|
+
'game',
|
|
121
|
+
'acceptAllianceDiplomacy',
|
|
122
|
+
acceptAllianceDiplomacySchema,
|
|
123
|
+
acceptAllianceDiplomacy,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
export const answerAllianceApplicationCommand: NetworkCommand = observedCommand(
|
|
127
|
+
'game',
|
|
128
|
+
'answerAllianceApplication',
|
|
129
|
+
answerAllianceApplicationSchema,
|
|
130
|
+
answerAllianceApplication,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
export const changeAllianceRankCommand: NetworkCommand = observedCommand(
|
|
134
|
+
'game',
|
|
135
|
+
'changeAllianceRank',
|
|
136
|
+
changeAllianceRankSchema,
|
|
137
|
+
changeAllianceRank,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
export const createAllianceDiplomacyCommand: NetworkCommand = observedCommand(
|
|
141
|
+
'game',
|
|
142
|
+
'createAllianceDiplomacy',
|
|
143
|
+
createAllianceDiplomacySchema,
|
|
144
|
+
createAllianceDiplomacy,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
export const deleteAllianceDiplomacyCommand: NetworkCommand = observedCommand(
|
|
148
|
+
'game',
|
|
149
|
+
'deleteAllianceDiplomacy',
|
|
150
|
+
deleteAllianceDiplomacySchema,
|
|
151
|
+
deleteAllianceDiplomacy,
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
export const allianceAdminDetailApplyCommand: NetworkCommand = observedCommand(
|
|
155
|
+
'game',
|
|
156
|
+
'allianceAdminDetailApply',
|
|
157
|
+
allianceAdminDetailApplySchema,
|
|
158
|
+
allianceAdminDetailApply,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
export const allianceAdminDiplomacyCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
162
|
+
'game',
|
|
163
|
+
'allianceAdminDiplomacy',
|
|
164
|
+
emptyInput,
|
|
165
|
+
(session) => allianceAdminDiplomacy(session),
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
export const allianceAdminDiplomacyCreateCommand: NetworkCommand = observedCommand<
|
|
169
|
+
Record<string, never>
|
|
170
|
+
>('game', 'allianceAdminDiplomacyCreate', emptyInput, (session) =>
|
|
171
|
+
allianceAdminDiplomacyCreate(session),
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
export const dissolveAllianceCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
175
|
+
'game',
|
|
176
|
+
'dissolveAlliance',
|
|
177
|
+
emptyInput,
|
|
178
|
+
(session) => dissolveAlliance(session),
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
export const kickAllianceMemberCommand: NetworkCommand = observedCommand(
|
|
182
|
+
'game',
|
|
183
|
+
'kickAllianceMember',
|
|
184
|
+
kickAllianceMemberSchema,
|
|
185
|
+
kickAllianceMember,
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
export const allianceAdminManageApplyCommand: NetworkCommand = observedCommand<
|
|
189
|
+
Record<string, never>
|
|
190
|
+
>('game', 'allianceAdminManageApply', emptyInput, (session) => allianceAdminManageApply(session))
|
|
191
|
+
|
|
192
|
+
export const allianceAdminMembersCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
193
|
+
'game',
|
|
194
|
+
'allianceAdminMembers',
|
|
195
|
+
emptyInput,
|
|
196
|
+
(session) => allianceAdminMembers(session),
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
export const allianceAdminOverviewCommand: NetworkCommand = observedCommand(
|
|
200
|
+
'game',
|
|
201
|
+
'allianceAdminOverview',
|
|
202
|
+
allianceAdminOverviewSchema,
|
|
203
|
+
allianceAdminOverview,
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
export const allianceAdminPermissionsCommand: NetworkCommand = observedCommand<
|
|
207
|
+
Record<string, never>
|
|
208
|
+
>('game', 'allianceAdminPermissions', emptyInput, (session) => allianceAdminPermissions(session))
|
|
209
|
+
|
|
210
|
+
export const setAllianceMemberRankCommand: NetworkCommand = observedCommand(
|
|
211
|
+
'game',
|
|
212
|
+
'setAllianceMemberRank',
|
|
213
|
+
setAllianceMemberRankSchema,
|
|
214
|
+
setAllianceMemberRank,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
export const allianceAdminTransferCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
218
|
+
'game',
|
|
219
|
+
'allianceAdminTransfer',
|
|
220
|
+
emptyInput,
|
|
221
|
+
(session) => allianceAdminTransfer(session),
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
export const transferAllianceLeadershipCommand: NetworkCommand = observedCommand(
|
|
225
|
+
'game',
|
|
226
|
+
'transferAllianceLeadership',
|
|
227
|
+
transferAllianceLeadershipSchema,
|
|
228
|
+
transferAllianceLeadership,
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
export const updateAllianceSettingsCommand: NetworkCommand = observedCommand(
|
|
232
|
+
'game',
|
|
233
|
+
'updateAllianceSettings',
|
|
234
|
+
updateAllianceSettingsSchema,
|
|
235
|
+
updateAllianceSettings,
|
|
236
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { arsenal } 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 arsenalCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
8
|
+
'game',
|
|
9
|
+
'arsenal',
|
|
10
|
+
emptyInput,
|
|
11
|
+
(session) => arsenal(session),
|
|
12
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { banList } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { numberInput, optional } from '../../input/spec.ts'
|
|
5
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
6
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
7
|
+
|
|
8
|
+
const banListSchema = {
|
|
9
|
+
kind: 'object',
|
|
10
|
+
fields: {
|
|
11
|
+
page: optional(numberInput),
|
|
12
|
+
},
|
|
13
|
+
} satisfies InputSpec<Parameters<typeof banList>[1]>
|
|
14
|
+
|
|
15
|
+
export const banListCommand: NetworkCommand = observedCommand(
|
|
16
|
+
'game',
|
|
17
|
+
'banList',
|
|
18
|
+
banListSchema,
|
|
19
|
+
banList,
|
|
20
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { battleHall } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { enumeration, optional } from '../../input/spec.ts'
|
|
5
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
6
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
7
|
+
|
|
8
|
+
const battleHallSchema = {
|
|
9
|
+
kind: 'object',
|
|
10
|
+
fields: {
|
|
11
|
+
direction: optional(enumeration(['asc', 'desc'])),
|
|
12
|
+
order: optional(enumeration(['date', 'units'])),
|
|
13
|
+
},
|
|
14
|
+
} satisfies InputSpec<Parameters<typeof battleHall>[1]>
|
|
15
|
+
|
|
16
|
+
export const battleHallCommand: NetworkCommand = observedCommand(
|
|
17
|
+
'game',
|
|
18
|
+
'battleHall',
|
|
19
|
+
battleHallSchema,
|
|
20
|
+
battleHall,
|
|
21
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { battleReport } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { required, stringInput } from '../../input/spec.ts'
|
|
5
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
6
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
7
|
+
|
|
8
|
+
const battleReportSchema = {
|
|
9
|
+
kind: 'object',
|
|
10
|
+
fields: {
|
|
11
|
+
reportId: required(stringInput),
|
|
12
|
+
},
|
|
13
|
+
} satisfies InputSpec<Parameters<typeof battleReport>[1]>
|
|
14
|
+
|
|
15
|
+
export const battleReportCommand: NetworkCommand = observedCommand(
|
|
16
|
+
'game',
|
|
17
|
+
'battleReport',
|
|
18
|
+
battleReportSchema,
|
|
19
|
+
battleReport,
|
|
20
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { battleSimulator, battleSimulatorSend } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { battleCatalogInput, battleParticipantInput } from '../../input/game/battleSimulator.ts'
|
|
5
|
+
import { resourceInput } from '../../input/shared.ts'
|
|
6
|
+
import { arrayInput, numberInput, optional, required } from '../../input/spec.ts'
|
|
7
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
8
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
9
|
+
|
|
10
|
+
const battleSimulatorSchema = {
|
|
11
|
+
kind: 'object',
|
|
12
|
+
fields: {
|
|
13
|
+
planetId: required(numberInput),
|
|
14
|
+
slots: optional(numberInput),
|
|
15
|
+
},
|
|
16
|
+
} satisfies InputSpec<Parameters<typeof battleSimulator>[1]>
|
|
17
|
+
|
|
18
|
+
const battleSimulatorSendSchema = {
|
|
19
|
+
kind: 'object',
|
|
20
|
+
fields: {
|
|
21
|
+
attackers: required(arrayInput(battleParticipantInput)),
|
|
22
|
+
catalog: required(battleCatalogInput),
|
|
23
|
+
defenders: required(arrayInput(battleParticipantInput)),
|
|
24
|
+
resources: optional(resourceInput),
|
|
25
|
+
},
|
|
26
|
+
} satisfies InputSpec<Parameters<typeof battleSimulatorSend>[1]>
|
|
27
|
+
|
|
28
|
+
export const battleSimulatorCommand: NetworkCommand = observedCommand(
|
|
29
|
+
'game',
|
|
30
|
+
'battleSimulator',
|
|
31
|
+
battleSimulatorSchema,
|
|
32
|
+
battleSimulator,
|
|
33
|
+
'planetId',
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
export const battleSimulatorSendCommand: NetworkCommand = observedCommand(
|
|
37
|
+
'game',
|
|
38
|
+
'battleSimulatorSend',
|
|
39
|
+
battleSimulatorSendSchema,
|
|
40
|
+
battleSimulatorSend,
|
|
41
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { board } 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 boardCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
8
|
+
'game',
|
|
9
|
+
'board',
|
|
10
|
+
emptyInput,
|
|
11
|
+
(session) => board(session),
|
|
12
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { bonusSummary } 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 bonusSummaryCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
8
|
+
'game',
|
|
9
|
+
'bonusSummary',
|
|
10
|
+
emptyInput,
|
|
11
|
+
(session) => bonusSummary(session),
|
|
12
|
+
)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buddyList,
|
|
3
|
+
buddyListAccept,
|
|
4
|
+
buddyListDelete,
|
|
5
|
+
buddyListRequest,
|
|
6
|
+
buddyListSend,
|
|
7
|
+
} from '@senators/bifrost'
|
|
8
|
+
|
|
9
|
+
import { observedCommand } from '../../catalog.ts'
|
|
10
|
+
import { emptyInput, numberInput, required, stringInput } from '../../input/spec.ts'
|
|
11
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
12
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
13
|
+
|
|
14
|
+
const buddyListAcceptSchema = {
|
|
15
|
+
kind: 'object',
|
|
16
|
+
fields: {
|
|
17
|
+
entryId: required(numberInput),
|
|
18
|
+
},
|
|
19
|
+
} satisfies InputSpec<Parameters<typeof buddyListAccept>[1]>
|
|
20
|
+
|
|
21
|
+
const buddyListDeleteSchema = {
|
|
22
|
+
kind: 'object',
|
|
23
|
+
fields: {
|
|
24
|
+
entryId: required(numberInput),
|
|
25
|
+
},
|
|
26
|
+
} satisfies InputSpec<Parameters<typeof buddyListDelete>[1]>
|
|
27
|
+
|
|
28
|
+
const buddyListRequestSchema = {
|
|
29
|
+
kind: 'object',
|
|
30
|
+
fields: {
|
|
31
|
+
playerId: required(numberInput),
|
|
32
|
+
},
|
|
33
|
+
} satisfies InputSpec<Parameters<typeof buddyListRequest>[1]>
|
|
34
|
+
|
|
35
|
+
const buddyListSendSchema = {
|
|
36
|
+
kind: 'object',
|
|
37
|
+
fields: {
|
|
38
|
+
playerId: required(numberInput),
|
|
39
|
+
text: required(stringInput),
|
|
40
|
+
},
|
|
41
|
+
} satisfies InputSpec<Parameters<typeof buddyListSend>[1]>
|
|
42
|
+
|
|
43
|
+
export const buddyListCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
44
|
+
'game',
|
|
45
|
+
'buddyList',
|
|
46
|
+
emptyInput,
|
|
47
|
+
(session) => buddyList(session),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
export const buddyListAcceptCommand: NetworkCommand = observedCommand(
|
|
51
|
+
'game',
|
|
52
|
+
'buddyListAccept',
|
|
53
|
+
buddyListAcceptSchema,
|
|
54
|
+
buddyListAccept,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
export const buddyListDeleteCommand: NetworkCommand = observedCommand(
|
|
58
|
+
'game',
|
|
59
|
+
'buddyListDelete',
|
|
60
|
+
buddyListDeleteSchema,
|
|
61
|
+
buddyListDelete,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
export const buddyListRequestCommand: NetworkCommand = observedCommand(
|
|
65
|
+
'game',
|
|
66
|
+
'buddyListRequest',
|
|
67
|
+
buddyListRequestSchema,
|
|
68
|
+
buddyListRequest,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
export const buddyListSendCommand: NetworkCommand = observedCommand(
|
|
72
|
+
'game',
|
|
73
|
+
'buddyListSend',
|
|
74
|
+
buddyListSendSchema,
|
|
75
|
+
buddyListSend,
|
|
76
|
+
)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildings,
|
|
3
|
+
buildingsCancel,
|
|
4
|
+
buildingsDowngrade,
|
|
5
|
+
buildingsFinish,
|
|
6
|
+
buildingsRemove,
|
|
7
|
+
buildingsUpgrade,
|
|
8
|
+
} from '@senators/bifrost'
|
|
9
|
+
|
|
10
|
+
import { observedCommand } from '../../catalog.ts'
|
|
11
|
+
import { planetReferenceInput } from '../../input/shared.ts'
|
|
12
|
+
import { numberInput, required } from '../../input/spec.ts'
|
|
13
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
14
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
15
|
+
|
|
16
|
+
const buildingsDowngradeSchema = {
|
|
17
|
+
kind: 'object',
|
|
18
|
+
fields: { planetId: required(numberInput), elementId: required(numberInput) },
|
|
19
|
+
} satisfies InputSpec<Parameters<typeof buildingsDowngrade>[1]>
|
|
20
|
+
|
|
21
|
+
const buildingsRemoveSchema = {
|
|
22
|
+
kind: 'object',
|
|
23
|
+
fields: { planetId: required(numberInput), queueIndex: required(numberInput) },
|
|
24
|
+
} satisfies InputSpec<Parameters<typeof buildingsRemove>[1]>
|
|
25
|
+
|
|
26
|
+
const buildingsUpgradeSchema = {
|
|
27
|
+
kind: 'object',
|
|
28
|
+
fields: {
|
|
29
|
+
planetId: required(numberInput),
|
|
30
|
+
elementId: required(numberInput),
|
|
31
|
+
levels: required(numberInput),
|
|
32
|
+
},
|
|
33
|
+
} satisfies InputSpec<Parameters<typeof buildingsUpgrade>[1]>
|
|
34
|
+
|
|
35
|
+
export const buildingsCommand: NetworkCommand = observedCommand(
|
|
36
|
+
'game',
|
|
37
|
+
'buildings',
|
|
38
|
+
planetReferenceInput,
|
|
39
|
+
buildings,
|
|
40
|
+
'planetId',
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
export const buildingsCancelCommand: NetworkCommand = observedCommand(
|
|
44
|
+
'game',
|
|
45
|
+
'buildingsCancel',
|
|
46
|
+
planetReferenceInput,
|
|
47
|
+
buildingsCancel,
|
|
48
|
+
'planetId',
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
export const buildingsDowngradeCommand: NetworkCommand = observedCommand(
|
|
52
|
+
'game',
|
|
53
|
+
'buildingsDowngrade',
|
|
54
|
+
buildingsDowngradeSchema,
|
|
55
|
+
buildingsDowngrade,
|
|
56
|
+
'planetId',
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
export const buildingsFinishCommand: NetworkCommand = observedCommand(
|
|
60
|
+
'game',
|
|
61
|
+
'buildingsFinish',
|
|
62
|
+
planetReferenceInput,
|
|
63
|
+
buildingsFinish,
|
|
64
|
+
'planetId',
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
export const buildingsRemoveCommand: NetworkCommand = observedCommand(
|
|
68
|
+
'game',
|
|
69
|
+
'buildingsRemove',
|
|
70
|
+
buildingsRemoveSchema,
|
|
71
|
+
buildingsRemove,
|
|
72
|
+
'planetId',
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
export const buildingsUpgradeCommand: NetworkCommand = observedCommand(
|
|
76
|
+
'game',
|
|
77
|
+
'buildingsUpgrade',
|
|
78
|
+
buildingsUpgradeSchema,
|
|
79
|
+
buildingsUpgrade,
|
|
80
|
+
'planetId',
|
|
81
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { chat } 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 chatCommand: NetworkCommand = observedCommand<Record<string, never>>(
|
|
8
|
+
'game',
|
|
9
|
+
'chat',
|
|
10
|
+
emptyInput,
|
|
11
|
+
(session) => chat(session),
|
|
12
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { containers, containersOpen } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { planetReferenceInput } from '../../input/shared.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 containersSchema = planetReferenceInput satisfies InputSpec<Parameters<typeof containers>[1]>
|
|
10
|
+
|
|
11
|
+
const containersOpenSchema = {
|
|
12
|
+
kind: 'object',
|
|
13
|
+
fields: {
|
|
14
|
+
planetId: required(numberInput),
|
|
15
|
+
amount: required(numberInput),
|
|
16
|
+
},
|
|
17
|
+
} satisfies InputSpec<Parameters<typeof containersOpen>[1]>
|
|
18
|
+
|
|
19
|
+
export const containersCommand: NetworkCommand = observedCommand(
|
|
20
|
+
'game',
|
|
21
|
+
'containers',
|
|
22
|
+
containersSchema,
|
|
23
|
+
containers,
|
|
24
|
+
'planetId',
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
export const containersOpenCommand: NetworkCommand = observedCommand(
|
|
28
|
+
'game',
|
|
29
|
+
'containersOpen',
|
|
30
|
+
containersOpenSchema,
|
|
31
|
+
containersOpen,
|
|
32
|
+
'planetId',
|
|
33
|
+
)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { control } 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 controlSchema = planetReferenceInput satisfies InputSpec<Parameters<typeof control>[1]>
|
|
9
|
+
|
|
10
|
+
export const controlCommand: NetworkCommand = observedCommand(
|
|
11
|
+
'game',
|
|
12
|
+
'control',
|
|
13
|
+
controlSchema,
|
|
14
|
+
control,
|
|
15
|
+
'planetId',
|
|
16
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createMoon, createMoonBuy } 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 createMoonSchema = planetReferenceInput satisfies InputSpec<Parameters<typeof createMoon>[1]>
|
|
9
|
+
|
|
10
|
+
const createMoonBuySchema = planetReferenceInput satisfies InputSpec<
|
|
11
|
+
Parameters<typeof createMoonBuy>[1]
|
|
12
|
+
>
|
|
13
|
+
|
|
14
|
+
export const createMoonCommand: NetworkCommand = observedCommand(
|
|
15
|
+
'game',
|
|
16
|
+
'createMoon',
|
|
17
|
+
createMoonSchema,
|
|
18
|
+
createMoon,
|
|
19
|
+
'planetId',
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
export const createMoonBuyCommand: NetworkCommand = observedCommand(
|
|
23
|
+
'game',
|
|
24
|
+
'createMoonBuy',
|
|
25
|
+
createMoonBuySchema,
|
|
26
|
+
createMoonBuy,
|
|
27
|
+
'planetId',
|
|
28
|
+
)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { claimDailyBonus } 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 claimDailyBonusSchema = planetReferenceInput satisfies InputSpec<
|
|
9
|
+
Parameters<typeof claimDailyBonus>[1]
|
|
10
|
+
>
|
|
11
|
+
|
|
12
|
+
export const claimDailyBonusCommand: NetworkCommand = observedCommand(
|
|
13
|
+
'game',
|
|
14
|
+
'claimDailyBonus',
|
|
15
|
+
claimDailyBonusSchema,
|
|
16
|
+
claimDailyBonus,
|
|
17
|
+
'planetId',
|
|
18
|
+
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { delivery, deliverySend } from '@senators/bifrost'
|
|
2
|
+
|
|
3
|
+
import { observedCommand } from '../../catalog.ts'
|
|
4
|
+
import { planetReferenceInput, resourceInput } from '../../input/shared.ts'
|
|
5
|
+
import { arrayInput, required } from '../../input/spec.ts'
|
|
6
|
+
import type { InputSpec } from '../../input/spec.ts'
|
|
7
|
+
import type { NetworkCommand } from '../../types.ts'
|
|
8
|
+
|
|
9
|
+
const deliverySchema = planetReferenceInput satisfies InputSpec<Parameters<typeof delivery>[1]>
|
|
10
|
+
|
|
11
|
+
const deliverySendSchema = {
|
|
12
|
+
kind: 'object',
|
|
13
|
+
fields: {
|
|
14
|
+
origin: required(planetReferenceInput),
|
|
15
|
+
resources: required(resourceInput),
|
|
16
|
+
targets: required(arrayInput(planetReferenceInput)),
|
|
17
|
+
},
|
|
18
|
+
} satisfies InputSpec<Parameters<typeof deliverySend>[1]>
|
|
19
|
+
|
|
20
|
+
export const deliveryCommand: NetworkCommand = observedCommand(
|
|
21
|
+
'game',
|
|
22
|
+
'delivery',
|
|
23
|
+
deliverySchema,
|
|
24
|
+
delivery,
|
|
25
|
+
'planetId',
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
export const deliverySendCommand: NetworkCommand = observedCommand(
|
|
29
|
+
'game',
|
|
30
|
+
'deliverySend',
|
|
31
|
+
deliverySendSchema,
|
|
32
|
+
deliverySend,
|
|
33
|
+
'origin',
|
|
34
|
+
)
|