The bot-account routes as a node of their own, beside the messaging bridge rather than in it: they read the stored bindings and ask the Project's machines, and never touch a connection. A machine-free server serves them the same way, answering for itself alone.
API
@Module({
contributes: {
"HttpModule.routes": [
{
id: "messaging.accounts",
prefix: "/api/messaging",
auth: "user",
order: 281,
},
{
id: "messaging.account-holders",
prefix: "/api/projects/:projectId/messaging",
auth: "user",
order: 282,
},
],
},
})
export class MessagingAccountsModule {
@Use() private readonly messagingRepo!: MessagingBindings;
@Use() private readonly sessionsRepo!: SessionIndex;
@Use() private readonly machines!: Machines;
@Use() private readonly access!: Access;
@Bind("messaging.accounts") accountsRoutes!: Hono<AppEnv>;
@Bind("messaging.account-holders") accountHoldersRoutes!: Hono<AppEnv>;
setup();
}Dependencies & Wiring
Extracted from class decorators@Userequires (4)
@Bindbinds (2)
accountsRoutes → messaging.accounts: Hono<AppEnv> · accountHoldersRoutes → messaging.account-holders: Hono<AppEnv>Contributes
{
"HttpModule.routes": [
{
"id": "messaging.accounts",
"prefix": "/api/messaging",
"auth": "user",
"order": 281
},
{
"id": "messaging.account-holders",
"prefix": "/api/projects/:projectId/messaging",
"auth": "user",
"order": 282
}
]
}Target slots: HttpModule.routes
Children (0)
No child modules or components declared in @Module.
Exports (0)
None (module-private).