Co-design cloud assistants with your web app and IoT devices.
This library provides a plugin to handle external web hook notifications, and map them into our internal pubsub
notifications.
Configuration is managed by one CA (e.g., root-admin
) by using a SharedMap with a well known name (e.g., webhook
) to store the routing table.
Bindings in that table are of the form id -> channel_id
, where id
is provided in the webhook target URL path, e.g., https://root-hello.cafjs.com/webhook/${id}
that was previously configured. The channel_id
is the name of the pubsub
channel to forward the notification.
See {@link module:caf_webhook/proxy_webhook}
See {@link module:caf_webhook/plug_webhook}
{
"name": "top",
"components" : [
{
"name": "webhook"
},
{
"module": "caf_webhook/plug",
"name": "webhook",
"description": "Webhook plugin\n Properties: ",
"env": {
"webhookMap": "process.env.WEBHOOK_MAP||root-admin-webhook"
}
}
]
}
See {@link module:caf_webhook/plug_ca_webhook}