Repository navigation
Register the participants service and its routes - #145
Merged
Merged
Conversation
Participants joins the Service and ServiceRuntime registries as a Bun service, the participant and participants segments are added, and the four routes of the service are declared: participant, participant/channel, participant/mailing and participants/channel/mailing/message. The channel, mailing and message segments take a parameter to serve them, so seven routes that already carried them (registration/channel, the chatapp and telegram registration channel and mailing routes) now carry that parameter in their pathname as well.
yurkimus
added a commit
that referenced
this pull request
Oct 27, 2026
The `participants` service now has a standalone channel, `POST channel/:channel` creates one and `QUERY channel/:channel` looks one up by its value, where `channel` is the kind of the platform (`vkontakte`, `telegram` or `email`) and the value travels in the body. The route is not known to the package yet. The `channel` route is added, and its pathname is `channel/:channel`, which the `channel` segment already produces since it took a pattern in #145. The segment itself had no service, as it served only the properties of registrations (`registration/channel` and its siblings), and the service of a route is the one of its first segment, so `routeService('channel')` would throw. It now belongs to the participants service. No other route changes: the first segment decides the service, and no other route starts with `channel`. I compared the pathname and the service of all the 128 existing routes against `main` and none differs. The generated `source/codegen/autogenerated.js` is left to the publish workflow, as in the other changes. The `url` package takes the route from the version this one publishes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
participantsservice of shaker-quiz/services#510 is not known to the package yet, sourl()cannot address it and its routes cannot be named throughroutePathname. Participants joinsServiceandServiceRuntime(a Bun service, like the other backend ones), theparticipantandparticipantssegments are added, and the four routes of the service are declared:participantparticipant/:participantparticipant/channelparticipant/:participant/channel/:channelparticipant/mailingparticipant/:participant/mailing/:mailingparticipants/channel/mailing/messageparticipants/channel/:channel/mailing/:mailing/message/:messageThese pathnames are the ones the service serves today from its own
route-pathname.js, which it can drop once it depends on this version. Herechannelis the kind of the channel (vkontakte,telegramoremail), andmailingandmessageare ids.To build them the
channel,mailingandmessagesegments take a parameter:mailingandmessagea uuid,channela word. They had none, and a segment gets its:paramin the pathname only when it has a pattern, so seven routes that already contain them change their pathname:registration/channel:registration/:registration/channelbecomesregistration/:registration/channel/:channelchatapp/registration/channel: the same with thechatapp/prefixchatapp/registrations/channel:chatapp/registrations/channelbecomeschatapp/registrations/channel/:channeltelegram/registration/mailing:…/:registration/mailingbecomes…/:registration/mailing/:mailingchatapp/registration/mailing: the same with thechatapp/prefixtelegram/registrations/mailingandchatapp/registrations/mailing:…/mailingbecomes…/mailing/:mailingNothing breaks until a consumer bumps the package, as the services and the frontends pin it exactly, but the registrations, updates, hub and landing code that names these routes will need to follow when it does.
The generated
source/codegen/autogenerated.jsis left to the publish workflow, as in the other changes. Theurlpackage gets itssource/participantsfrom this version through the same cascade.