You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Bot communication
Describe the solution you'd like
bot publishes an API for other bots/servers to submit requests too
maybe a router declared via tuples?
api(config?: apiConfig)(['GET /report/latest',chain(... botactions)],// so maps maybe 1 BotAction to the request then dev assembles?['PUT /like/post',chain(... botactions)])
Then whatever the final value returned by the BotAction is returned with success 200. Otherwise, you can return a HTTPResponseSignal that has response headers, status code, etc for configuring the response in detail
Additional context
Hold this until v2, when the page BotAction param is replaced as an injectable
The text was updated successfully, but these errors were encountered:
plan is to build on a framework like Express, Fastify or something similar, which in that case, this will be separated into its own auxiliary package and have its function name focused to the framework in choice ie expressAPI()(), fastifyAPI()() etc that uses their types for configuration, middleware, etc
in the future, might be worth consolidating like code with a more general api auxiliary package that abstracts the common units of functionality for all focused API auxiliary packages to implement
Is your feature request related to a problem? Please describe.
Bot communication
Describe the solution you'd like
bot publishes an API for other bots/servers to submit requests too
maybe a router declared via tuples?
Then whatever the final value returned by the BotAction is returned with success 200. Otherwise, you can return a
HTTPResponseSignal
that has response headers, status code, etc for configuring the response in detailAdditional context
Hold this until v2, when the
page
BotAction param is replaced as an injectableThe text was updated successfully, but these errors were encountered: